summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2023-07-28 10:44:54 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2024-03-20 09:56:59 +0100
commita33732ab74ed40ed0f6387651ccbac6eef7db18c (patch)
treea41f2489eef0ae03b0aca758d66612d441641f85 /cmake
parente67704c40fd92aa67efa3fa86e0268ec7f5da3e3 (diff)
CMake: Pass CMAKE_MODULE_PATH to external project examples
Some examples depend on FindWrapFoo.cmake scripts that are part of a repo. An example is qtgrpc with FindWrapProtoc.cmake. These need to be available when building external project examples in a prefix build where the repo is not installed yet, and thus the source dir FindWrap scripts need to be used instead. Make sure to pass the value of CMAKE_MODULE_PATH to the external projects to ensure these scripts are found. CMAKE_MODULE_PATH is populated by qt_set_up_build_internals_paths as part of the qt repo build. Task-number: QTBUG-90820 Task-number: QTBUG-96232 Change-Id: I3e977919bc137ed60e8eb9300625e5d8b87b373e Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 20bd9fad1cf6d41c773056949e334c3ab75e8b1c) Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBuildRepoExamplesHelpers.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/QtBuildRepoExamplesHelpers.cmake b/cmake/QtBuildRepoExamplesHelpers.cmake
index 3e2f8a508f..9c243a104d 100644
--- a/cmake/QtBuildRepoExamplesHelpers.cmake
+++ b/cmake/QtBuildRepoExamplesHelpers.cmake
@@ -373,6 +373,7 @@ function(qt_internal_add_example_external_project subdir)
QT_BUILD_CMAKE_PREFIX_PATH:STRING
QT_ADDITIONAL_PACKAGES_PREFIX_PATH:STRING
CMAKE_FIND_ROOT_PATH:STRING
+ CMAKE_MODULE_PATH:STRING
BUILD_SHARED_LIBS:BOOL
CMAKE_OSX_ARCHITECTURES:STRING
CMAKE_OSX_DEPLOYMENT_TARGET:STRING