summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/QtPostProcessHelpers.cmake13
-rw-r--r--cmake/QtPublicAppleHelpers.cmake6
2 files changed, 18 insertions, 1 deletions
diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake
index c690ff521fb..dfcbefd4f8a 100644
--- a/cmake/QtPostProcessHelpers.cmake
+++ b/cmake/QtPostProcessHelpers.cmake
@@ -720,6 +720,19 @@ set(QT_COPYRIGHT_YEAR \"${QT_COPYRIGHT_YEAR}\" CACHE STRING \"\")
set(QT_COPYRIGHT \"${QT_COPYRIGHT}\" CACHE STRING \"\")
")
+ # Add the apple version requirements to the BuildInternals extra code, so the info is
+ # available when configuring a standalone test.
+ # Otherwise when QtSetup is included after a
+ # find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+ # call, Qt6ConfigExtras.cmake is not included yet, the requirements are not available and
+ # _qt_internal_check_apple_sdk_and_xcode_versions() would fail.
+ _qt_internal_export_apple_sdk_and_xcode_version_requirements(apple_requirements)
+ if(apple_requirements)
+ string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS "
+${apple_requirements}
+")
+ endif()
+
qt_compute_relative_path_from_cmake_config_dir_to_prefix()
configure_file(
"${CMAKE_CURRENT_LIST_DIR}/QtBuildInternalsExtra.cmake.in"
diff --git a/cmake/QtPublicAppleHelpers.cmake b/cmake/QtPublicAppleHelpers.cmake
index 7727bb3f16d..09e189fb384 100644
--- a/cmake/QtPublicAppleHelpers.cmake
+++ b/cmake/QtPublicAppleHelpers.cmake
@@ -692,7 +692,11 @@ function(_qt_internal_export_apple_sdk_and_xcode_version_requirements out_var)
set(assignments "")
foreach(var IN LISTS vars_to_assign)
set(value "${${var}}")
- list(APPEND assignments "set(${var} \"${value}\")")
+ list(APPEND assignments
+ "
+if(NOT ${var})
+ set(${var} \"${value}\")
+endif()")
endforeach()
list(JOIN assignments "\n" assignments)