From 204765ba495529b21a2c7150ce3ec51b4738bc49 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 20 Sep 2019 15:20:57 +0200 Subject: cmake: Include repo-specific setup files This is useful for providing private CMake API which is not part of QtBase. Also, fix the setup files to be included when building standalone tests. The old ${PROJECT_NAME}Setup.cmake file inclusion will be removed once all usages are adjusted. Prompted-by: Alexandru Croitor Change-Id: I5bc2bca7371660c00b0301e94d025a29b68d6975 Reviewed-by: Alexandru Croitor --- cmake/QtBuildInternals/QtBuildInternalsConfig.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake index cfd11cd6f9..6fffcaba9d 100644 --- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake +++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake @@ -32,6 +32,11 @@ macro(qt_set_up_build_internals_paths) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake") list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") endif() + + # Find the cmake files when doing a standalone tests build. + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") + list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") + endif() endmacro() macro(qt_build_repo_begin) @@ -47,6 +52,7 @@ macro(qt_build_repo_begin) # Optionally include a repo specific Setup module. include(${PROJECT_NAME}Setup OPTIONAL) + include(QtRepoSetup OPTIONAL) # Find Apple frameworks if needed. qt_find_apple_system_frameworks() @@ -137,6 +143,10 @@ endmacro() macro(qt_set_up_standalone_tests_build) qt_set_up_build_internals_paths() include(QtSetup) + + # Optionally include a repo specific Setup module. + include(QtRepoSetup OPTIONAL) + qt_find_apple_system_frameworks() qt_check_if_tools_will_be_built() endmacro() -- cgit v1.2.3