diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-09-20 15:20:57 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-09-23 06:11:18 +0000 |
commit | 204765ba495529b21a2c7150ce3ec51b4738bc49 (patch) | |
tree | 5e0e99e795d1072038d72f3a16f0437dc3035e3c /cmake | |
parent | d8b18385e88df29dd0ce38db484d1d7912ddea15 (diff) |
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 <alexandru.croitor@qt.io>
Change-Id: I5bc2bca7371660c00b0301e94d025a29b68d6975
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtBuildInternals/QtBuildInternalsConfig.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
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() |