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>
This commit is contained in:
parent
d8b18385e8
commit
204765ba49
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user