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:
parent
9942dcc8d9
commit
0e88d99c50
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user