diff options
-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") |