Write version file so user can specify lower bound

With the version file present, a user program can depend on a certain
version of the library.
This commit is contained in:
Roland Kaufmann 2012-12-07 13:14:53 +01:00
parent 9942dcc8d9
commit 0e88d99c50
2 changed files with 11 additions and 0 deletions

View File

@ -138,6 +138,12 @@ configure_vars (
FILE CMAKE "${PROJECT_BINARY_DIR}/opm-core-config.cmake"
APPEND "${opm-core_CONFIG_VARS}"
)
include (WriteBasicConfigVersionFile)
write_basic_config_version_file (
"${PROJECT_BINARY_DIR}/opm-core-config-version.cmake"
VERSION ${opm-core_VERSION}
COMPATIBILITY SameMajorVersion
)
### installation ###
string (LENGTH ${PROJECT_SOURCE_DIR} _prefix_length)

View File

@ -39,4 +39,9 @@ function (opm_cmake_config name)
DESTINATION share/cmake/${name}
RENAME ${name}-config.cmake
)
# assume that there exists a version file already
install (
FILES ${PROJECT_BINARY_DIR}/${name}-config-version.cmake
DESTINATION share/cmake/${name}
)
endfunction (opm_cmake_config name)