-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Export version for downstream usage
Move all downstream related config to one file
Showing
2 changed files
with
16 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,22 @@ | ||
include(CMakePackageConfigHelpers) | ||
|
||
# Version file is same wherever we are | ||
write_basic_package_version_file(${PROJECT_BINARY_DIR}/k4FWCoreConfigVersion.cmake | ||
VERSION ${k4FWCore_VERSION} | ||
COMPATIBILITY SameMajorVersion) | ||
|
||
|
||
configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/k4FWCoreConfig.cmake.in | ||
${PROJECT_BINARY_DIR}/k4FWCoreConfig.cmake | ||
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/k4FWCore | ||
PATH_VARS CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR) | ||
|
||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/k4FWCoreConfig.cmake | ||
${CMAKE_CURRENT_BINARY_DIR}/k4FWCoreConfigVersion.cmake | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ) | ||
|
||
install(EXPORT ${PROJECT_NAME}Targets | ||
NAMESPACE ${PROJECT_NAME}:: | ||
FILE "${PROJECT_NAME}Targets.cmake" | ||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/" | ||
) |