summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-02-09 13:23:24 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-02-09 13:23:30 (GMT)
commitcab99f7dba2b3609791c865d865fe88a4dc77566 (patch)
tree950b71c11089831b6b490e9c4c32a30d7f80d2ed /Modules
parent40f4147224dd6f3839a224f89dc85f357176fd2f (diff)
parent0110aa018d81a7b0f1f9371fcd038b71fefae554 (diff)
downloadCMake-cab99f7dba2b3609791c865d865fe88a4dc77566.zip
CMake-cab99f7dba2b3609791c865d865fe88a4dc77566.tar.gz
CMake-cab99f7dba2b3609791c865d865fe88a4dc77566.tar.bz2
Merge topic 'xcode12-ios_install_combined'
0110aa018d IOS_INSTALL_COMBINED: Support Xcode 12 (command line only) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5785
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeIOSInstallCombined.cmake31
1 files changed, 18 insertions, 13 deletions
diff --git a/Modules/CMakeIOSInstallCombined.cmake b/Modules/CMakeIOSInstallCombined.cmake
index 44bb622..b022217 100644
--- a/Modules/CMakeIOSInstallCombined.cmake
+++ b/Modules/CMakeIOSInstallCombined.cmake
@@ -3,10 +3,11 @@
cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW) # if IN_LIST
+cmake_policy(SET CMP0054 NEW)
# Function to print messages of this module
function(_ios_install_combined_message)
- message("[iOS combined] " ${ARGN})
+ message(STATUS "[iOS combined] " ${ARGN})
endfunction()
# Get build settings for the current target/config/SDK by running
@@ -176,29 +177,33 @@ function(_ios_install_combined_keep_archs lib archs)
endforeach()
endfunction()
-function(_ios_install_combined_detect_sdks this_sdk_var corr_sdk_var)
- set(this_sdk "$ENV{PLATFORM_NAME}")
- if("${this_sdk}" STREQUAL "")
- message(FATAL_ERROR "Environment variable PLATFORM_NAME is empty")
+function(_ios_install_combined_detect_associated_sdk corr_sdk_var)
+ if("${PLATFORM_NAME}" STREQUAL "")
+ message(FATAL_ERROR "PLATFORM_NAME should not be empty")
endif()
set(all_platforms "$ENV{SUPPORTED_PLATFORMS}")
- if("${all_platforms}" STREQUAL "")
- message(FATAL_ERROR "Environment variable SUPPORTED_PLATFORMS is empty")
+ if("${SUPPORTED_PLATFORMS}" STREQUAL "")
+ _ios_install_combined_get_build_setting(
+ ${PLATFORM_NAME} SUPPORTED_PLATFORMS all_platforms)
+ if("${all_platforms}" STREQUAL "")
+ message(FATAL_ERROR
+ "SUPPORTED_PLATFORMS not set as an environment variable nor "
+ "able to be determined from project")
+ endif()
endif()
separate_arguments(all_platforms)
- if(NOT this_sdk IN_LIST all_platforms)
- message(FATAL_ERROR "`${this_sdk}` not found in `${all_platforms}`")
+ if(NOT PLATFORM_NAME IN_LIST all_platforms)
+ message(FATAL_ERROR "`${PLATFORM_NAME}` not found in `${all_platforms}`")
endif()
- list(REMOVE_ITEM all_platforms "" "${this_sdk}")
+ list(REMOVE_ITEM all_platforms "" "${PLATFORM_NAME}")
list(LENGTH all_platforms all_platforms_length)
if(NOT all_platforms_length EQUAL 1)
message(FATAL_ERROR "Expected one element: ${all_platforms}")
endif()
- set(${this_sdk_var} "${this_sdk}" PARENT_SCOPE)
set(${corr_sdk_var} "${all_platforms}" PARENT_SCOPE)
endfunction()
@@ -274,10 +279,10 @@ function(ios_install_combined target destination)
_ios_install_combined_message("Destination: ${destination}")
# Get SDKs
- _ios_install_combined_detect_sdks(this_sdk corr_sdk)
+ _ios_install_combined_detect_associated_sdk(corr_sdk)
# Get architectures of the target
- _ios_install_combined_get_valid_archs("${this_sdk}" this_valid_archs)
+ _ios_install_combined_get_valid_archs("${PLATFORM_NAME}" this_valid_archs)
_ios_install_combined_get_valid_archs("${corr_sdk}" corr_valid_archs)
_ios_install_combined_prune_common_archs("${corr_sdk}" corr_valid_archs this_valid_archs)