diff options
author | Alex Neundorf <neundorf@kde.org> | 2012-05-12 21:25:36 +0200 |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2012-05-12 21:28:58 +0200 |
commit | 653895414dca71dde86dd78f493b5b646bb36ab7 (patch) | |
tree | d98c7c6dd574ff78986f060f41785d8c4ffb73f2 /CMakeLists.txt | |
parent | 0f46b993438abce7a2b90c7ba720427cbe827e8d (diff) | |
download | extra-cmake-modules-653895414dca71dde86dd78f493b5b646bb36ab7.tar.gz extra-cmake-modules-653895414dca71dde86dd78f493b5b646bb36ab7.tar.bz2 |
rework of extra-cmake-modules
-rename the cmake package from extra-cmake-modules to ECM
-change variable names and docs accordingly
-move setting of Qt-related defines from ECMQtFrameworks.cmake to KDECompilerSettings.cmake
-remove ECMSetVersionVariables.cmake, we'll do it some other way
-rename ECMConfig.cmake.in to ECMQtFrameworkConfig.cmake.in, since this is where it is used, and it would have the same name as ECMConfig.cmake.in which is for extra-cmake-modules itself
Alex
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ca946dc..dd1c04fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,14 +4,14 @@ project(extra-cmake-modules) set(ECM_MAJOR_VERSION 0) set(ECM_MINOR_VERSION 0) -set(ECM_PATCH_VERSION 3) +set(ECM_PATCH_VERSION 4) set(ECM_VERSION ${ECM_MAJOR_VERSION}.${ECM_MINOR_VERSION}.${ECM_PATCH_VERSION}) enable_testing() add_subdirectory(tests) -set(SHARE_INSTALL_DIR share/extra-cmake-modules-${ECM_VERSION}) +set(SHARE_INSTALL_DIR share/ECM-${ECM_VERSION}) set(MODULES_INSTALL_DIR ${SHARE_INSTALL_DIR}/modules/) set(KDE_MODULES_INSTALL_DIR ${SHARE_INSTALL_DIR}/kde-modules/) set(FIND_MODULES_INSTALL_DIR ${SHARE_INSTALL_DIR}/find-modules/) @@ -41,19 +41,20 @@ install(FILES ${installKdeModuleFiles} DESTINATION ${KDE_MODULES_INSTALL_DIR}) file(GLOB installFindModuleFiles ${CMAKE_SOURCE_DIR}/find-modules/*[^~]) install(FILES ${installFindModuleFiles} DESTINATION ${FIND_MODULES_INSTALL_DIR}) -# figure out the relative path from the installed Config.cmake file to the install prefix (which may be at -# runtime different from the chosen CMAKE_INSTALL_PREFIX if under Windows the package was installed anywhere) -# This relative path will be configured into the BarConfig.cmake -file(RELATIVE_PATH relInstallDir ${CMAKE_INSTALL_PREFIX}/${CMAKECONFIG_INSTALL_DIR} ${CMAKE_INSTALL_PREFIX}) -configure_file(extra-cmake-modules-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/extra-cmake-modules-config.cmake @ONLY) -include(WriteBasicConfigVersionFile) -write_basic_config_version_file( ${CMAKE_CURRENT_BINARY_DIR}/extra-cmake-modules-config-version.cmake +include(CMakePackageConfigHelpers) + +configure_package_config_file(ECMConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/ECMConfig.cmake + INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} + PATH_VARS FIND_MODULES_INSTALL_DIR KDE_MODULES_INSTALL_DIR MODULES_INSTALL_DIR ) + + +write_basic_package_version_file( ${CMAKE_CURRENT_BINARY_DIR}/ECMConfigVersion.cmake VERSION ${ECM_MAJOR_VERSION}.${ECM_MINOR_VERSION}.${ECM_PATCH_VERSION} COMPATIBILITY AnyNewerVersion ) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/extra-cmake-modules-config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/extra-cmake-modules-config-version.cmake +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ECMConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/ECMConfigVersion.cmake DESTINATION ${CMAKECONFIG_INSTALL_DIR}) # need to install a Config.cmake file |