From 82a2c7df3023e68f152e522dacdcbb076cdde701 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 14 Aug 2019 17:06:20 +0200 Subject: CMake: Fix detection of debug_and_release for iOS simulator_and_device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit create_cmake.prf populates the values of CMAKE_RELEASE_TYPE and CMAKE_DEBUG_TYPE depending on if Qt was configured with debug, or release, or the build_all feature was set (which implies debug_and_release). simulator_and_device also implies build_all. This is a problem when configuring a Qt simulator_and_device build with only a "debug" configuration, or only a "release" configuration. In that case we would try to parse prl files for both configurations, even though only one configuration exists. Switch to checking for debug_and_release scope explicitly instead of build_all. This allows configuring and building a Qt iOS device_and_simulator debug configuration which is usable from CMake. Task-number: QTBUG-38913 Change-Id: Ife6d5d34d2b6bb1ac787d901a166e41c6e0c844b Reviewed-by: Jörg Bornemann --- mkspecs/features/create_cmake.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index e88d6175a4..65c637244b 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -138,8 +138,8 @@ CMAKE_RELEASE_TYPE = # the debug libraries at build time. equals(QMAKE_HOST.os, Windows): CMAKE_BIN_SUFFIX = ".exe" -if(build_all|CONFIG(debug, debug|release)): CMAKE_DEBUG_TYPE = debug -if(build_all|CONFIG(release, debug|release)): CMAKE_RELEASE_TYPE = release +debug_and_release|CONFIG(debug, debug|release): CMAKE_DEBUG_TYPE = debug +debug_and_release|CONFIG(release, debug|release): CMAKE_RELEASE_TYPE = release # CMAKE_DEBUG_AND_RELEASE is used to tell the _populate_$${CMAKE_MODULE_NAME}_target_properties # functions whether a Configuration specific generator expression needs to be added to the values -- cgit v1.2.3