From 23396dbc7d96632d5299ad660623bcf539493bc2 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Wed, 13 Nov 2013 16:50:38 +0100 Subject: [PATCH] Need to propagate the infix as well --- CMakeLists.txt | 26 +++++++++++++------------- QtKeychainConfig.cmake.in | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9826912..a18ad83 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,12 +15,12 @@ option(BUILD_WITH_QT4 "Build qtkeychain with Qt4 no matter if Qt5 was found" OFF if( NOT BUILD_WITH_QT4 ) - set(version_infix 5) + set(QTKEYCHAIN_VERSION_INFIX 5) # try Qt5 first, and prefer that if found find_package(Qt5Core QUIET) endif() -set(QTKEYCHAIN_TARGET_NAME qt${version_infix}keychain) +set(QTKEYCHAIN_TARGET_NAME qt${QTKEYCHAIN_VERSION_INFIX}keychain) if (Qt5Core_FOUND) if(UNIX AND NOT APPLE) @@ -142,7 +142,7 @@ install(FILES keychain.h qkeychain_export.h ) install(TARGETS ${QTKEYCHAIN_TARGET_NAME} - EXPORT Qt${version_infix}KeychainLibraryDepends + EXPORT Qt${QTKEYCHAIN_VERSION_INFIX}KeychainLibraryDepends RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} @@ -156,22 +156,22 @@ target_link_libraries( testclient ${QTKEYCHAIN_TARGET_NAME}) ### CMake config file ### -export(TARGETS ${QTKEYCHAIN_TARGET_NAME} FILE "${PROJECT_BINARY_DIR}/Qt${version_infix}KeychainLibraryDepends.cmake") -export(PACKAGE Qt${version_infix}Keychain) +export(TARGETS ${QTKEYCHAIN_TARGET_NAME} FILE "${PROJECT_BINARY_DIR}/Qt${QTKEYCHAIN_VERSION_INFIX}KeychainLibraryDepends.cmake") +export(PACKAGE Qt${QTKEYCHAIN_VERSION_INFIX}Keychain) configure_file(QtKeychainBuildTreeSettings.cmake.in - "${PROJECT_BINARY_DIR}/Qt${version_infix}KeychainBuildTreeSettings.cmake" @ONLY) + "${PROJECT_BINARY_DIR}/Qt${QTKEYCHAIN_VERSION_INFIX}KeychainBuildTreeSettings.cmake" @ONLY) configure_file(QtKeychainConfig.cmake.in - "${PROJECT_BINARY_DIR}/Qt${version_infix}KeychainConfig.cmake" @ONLY) + "${PROJECT_BINARY_DIR}/Qt${QTKEYCHAIN_VERSION_INFIX}KeychainConfig.cmake" @ONLY) configure_file(QtKeychainConfigVersion.cmake.in - "${PROJECT_BINARY_DIR}/Qt${version_infix}KeychainConfigVersion.cmake" @ONLY) + "${PROJECT_BINARY_DIR}/Qt${QTKEYCHAIN_VERSION_INFIX}KeychainConfigVersion.cmake" @ONLY) -install(EXPORT Qt${version_infix}KeychainLibraryDepends - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Qt${version_infix}Keychain" +install(EXPORT Qt${QTKEYCHAIN_VERSION_INFIX}KeychainLibraryDepends + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Qt${QTKEYCHAIN_VERSION_INFIX}Keychain" ) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Qt${version_infix}KeychainConfig.cmake - ${CMAKE_CURRENT_BINARY_DIR}/Qt${version_infix}KeychainConfigVersion.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Qt${version_infix}Keychain +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Qt${QTKEYCHAIN_VERSION_INFIX}KeychainConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/Qt${QTKEYCHAIN_VERSION_INFIX}KeychainConfigVersion.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Qt${QTKEYCHAIN_VERSION_INFIX}Keychain ) diff --git a/QtKeychainConfig.cmake.in b/QtKeychainConfig.cmake.in index b9e4269..74c1356 100644 --- a/QtKeychainConfig.cmake.in +++ b/QtKeychainConfig.cmake.in @@ -7,13 +7,13 @@ get_filename_component(QTKEYCHAIN_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) if(EXISTS "${QTKEYCHAIN_CMAKE_DIR}/CMakeCache.txt") # In build tree - include("${QTKEYCHAIN_CMAKE_DIR}/QtKeychainBuildTreeSettings.cmake") + include("${QTKEYCHAIN_CMAKE_DIR}/Qt@QTKEYCHAIN_VERSION_INFIX@KeychainBuildTreeSettings.cmake") else() set(QTKEYCHAIN_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@") endif() # Our library dependencies (contains definitions for IMPORTED targets) -include("${QTKEYCHAIN_CMAKE_DIR}/QtKeychainLibraryDepends.cmake") +include("${QTKEYCHAIN_CMAKE_DIR}/Qt@QTKEYCHAIN_VERSION_INFIX@KeychainLibraryDepends.cmake") # These are IMPORTED targets created by FooBarLibraryDepends.cmake set(QTKEYCHAIN_LIBRARIES "@QTKEYCHAIN_TARGET_NAME@")