diff options
Diffstat (limited to 'cmake/QtBuildInternals')
-rw-r--r-- | cmake/QtBuildInternals/QtBuildInternalsConfig.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake index a3b7bddb1a..34e40365ca 100644 --- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake +++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake @@ -19,6 +19,11 @@ macro(qt_build_repo_begin) # Set up the paths for the modules. set(QT_CMAKE_MODULE_PATH "${QT_BUILD_INTERNALS_PATH}/../${QT_CMAKE_EXPORT_NAMESPACE}") list(APPEND CMAKE_MODULE_PATH ${QT_CMAKE_MODULE_PATH}) + + # If the repo has its own cmake modules, include those in the module path. + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + endif() endif() # Qt specific setup common for all modules: @@ -30,6 +35,16 @@ macro(qt_build_repo_end) # Delayed actions on some of the Qt targets: include(QtPostProcess) + # Install the repo-specific cmake find modules. + qt_path_join(__qt_repo_install_dir ${QT_CONFIG_INSTALL_DIR} ${INSTALL_CMAKE_NAMESPACE}) + + if(NOT PROJECT_NAME STREQUAL "QtBase") + qt_copy_or_install(DIRECTORY cmake/ + DESTINATION "${__qt_repo_install_dir}" + FILES_MATCHING PATTERN "Find*.cmake" + ) + endif() + # Print a feature summary: feature_summary(WHAT PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND |