diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-09-14 09:06:58 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-09-14 15:03:13 +0200 |
commit | b9c493728aa9f73b6876c6bef0ebd9f07824f553 (patch) | |
tree | e0ffb8557d5650159b3d45b223acdf2a799c6371 /cmake/QtModuleConfig.cmake.in | |
parent | 721116de309f1933fad788fe4272c0d5c12b9909 (diff) |
Revert "Revert "CMake: Fix usage of find_dependency()""
...and fix the build errors the original change caused.
This reverts commit 127fb8bb5587db52216d0ac934f3111170a7cbe3.
Change-Id: I4006b32734a51c5d101dd73c957f81d2a0f84ba1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtModuleConfig.cmake.in')
-rw-r--r-- | cmake/QtModuleConfig.cmake.in | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmake/QtModuleConfig.cmake.in b/cmake/QtModuleConfig.cmake.in index 37527d1da6..f34bafb948 100644 --- a/cmake/QtModuleConfig.cmake.in +++ b/cmake/QtModuleConfig.cmake.in @@ -14,6 +14,12 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependenci include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake") endif() +# If *ConfigDependencies.cmake exists, the variable value will be defined there. +# Don't override it in that case. +if(NOT DEFINED "@INSTALL_CMAKE_NAMESPACE@@target@_FOUND") + set("@INSTALL_CMAKE_NAMESPACE@@target@_FOUND" TRUE) +endif() + if (NOT QT_NO_CREATE_TARGETS) include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Targets.cmake") if(NOT QT_NO_CREATE_VERSIONLESS_TARGETS) @@ -85,7 +91,6 @@ include(${_qt_@PROJECT_VERSION_MAJOR@_config_cmake_dir}/QtFeature.cmake) qt_make_features_available(@QT_CMAKE_EXPORT_NAMESPACE@::@target@) -set("@INSTALL_CMAKE_NAMESPACE@@target@_FOUND" TRUE) if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Plugins.cmake") include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Plugins.cmake") endif() |