diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-03-29 10:49:53 +0200 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-03-29 10:49:53 +0200 |
commit | 51a85fa0e8814dfe47bb5174fa09a0e216d17d19 (patch) | |
tree | 2d90e07a6af00b66ff2c8dd02afa89bfd0a21c0e | |
parent | 72e12a84cefa86758153ad20f6c8da63e1829ba4 (diff) | |
download | libquotient-51a85fa0e8814dfe47bb5174fa09a0e216d17d19.tar.gz libquotient-51a85fa0e8814dfe47bb5174fa09a0e216d17d19.zip |
Fix building tests with installed Quotient in E2EE configuration
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | cmake/QuotientConfig.cmake.in (renamed from cmake/QuotientConfig.cmake) | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d33f2ba..46ce64c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -252,6 +252,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC ) if (${PROJECT_NAME}_ENABLE_E2EE) target_link_libraries(${PROJECT_NAME} QtOlm) + set(FIND_DEPS "find_dependency(QtOlm)") # For QuotientConfig.cmake.in endif() target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Network Qt5::Gui Qt5::Multimedia) @@ -282,16 +283,17 @@ write_basic_package_version_file( export(PACKAGE ${PROJECT_NAME}) export(EXPORT ${PROJECT_NAME}Targets FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Targets.cmake") -configure_file(cmake/${PROJECT_NAME}Config.cmake +configure_file(cmake/${PROJECT_NAME}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" - COPYONLY + @ONLY ) set(ConfigFilesLocation "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") install(EXPORT ${PROJECT_NAME}Targets FILE ${PROJECT_NAME}Targets.cmake DESTINATION ${ConfigFilesLocation}) -install(FILES cmake/${PROJECT_NAME}Config.cmake +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake" DESTINATION ${ConfigFilesLocation} ) diff --git a/cmake/QuotientConfig.cmake b/cmake/QuotientConfig.cmake.in index 31ed4db6..798fa87a 100644 --- a/cmake/QuotientConfig.cmake +++ b/cmake/QuotientConfig.cmake.in @@ -1,6 +1,5 @@ include(CMakeFindDependencyMacro) -if (Quotient_ENABLE_E2EE) - find_dependency(QtOlm) -endif() +@FIND_DEPS@ + include("${CMAKE_CURRENT_LIST_DIR}/QuotientTargets.cmake") |