diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-06-04 17:42:09 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-06-15 10:53:32 +0000 |
commit | 8d23c52719a23dea77a75a959ca3462e38de259c (patch) | |
tree | c198410a3e8fba921b8ee589fba08071d0fe0866 /cmake | |
parent | e0979612a57d0a71c2b4f5d646547b5a5f6ab99c (diff) |
CMake: Ensure libs project is reconfigured when the root project is
To ensure that correct CMake and qmake support files are used when
building examples.
Change-Id: Ic52ee7f7153877071ab3883fd436ad888f90680d
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
(cherry picked from commit f04bc6833c01efc0fb37d6f6c31c6fa427087664)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Functions.cmake | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake index c61e403be..d29ed7a40 100644 --- a/cmake/Functions.cmake +++ b/cmake/Functions.cmake @@ -328,3 +328,23 @@ function(extend_target_with_gn_objects target config cmakeFile stampFile) ) endif() endfunction() + +function(qt_internal_add_external_project_dependency_to_root_project name) + set(independent_args) + cmake_policy(PUSH) + if(POLICY CMP0114) + set(independent_args INDEPENDENT TRUE) + cmake_policy(SET CMP0114 NEW) + endif() + + # Force configure step to re-run after we configure the root project + set(reconfigure_check_file ${CMAKE_CURRENT_BINARY_DIR}/reconfigure_${name}.stamp) + file(TOUCH ${reconfigure_check_file}) + ExternalProject_Add_Step(${name} reconfigure-check + DEPENDERS configure + DEPENDS ${reconfigure_check_file} + ${independent_args} + ) + + cmake_policy(POP) +endfunction() |