@@ -542,8 +542,7 @@ function(_add_swift_lipo_target)
542
542
list (APPEND source_binaries $< TARGET_FILE:${source_target} > )
543
543
endforeach ()
544
544
545
- is_darwin_based_sdk ("${LIPO_SDK} " IS_DARWIN )
546
- if (IS_DARWIN )
545
+ if (${LIPO_SDK} IN_LIST SWIFT_APPLE_PLATFORMS )
547
546
if (LIPO_CODESIGN )
548
547
set (codesign_command COMMAND "codesign" "-f" "-s" "-" "${LIPO_OUTPUT} " )
549
548
endif ()
@@ -751,8 +750,7 @@ function(_add_swift_library_single target name)
751
750
endif ()
752
751
753
752
if (SWIFT_COMPILER_VERSION )
754
- is_darwin_based_sdk ("${SWIFTLIB_SINGLE_SDK} " IS_DARWIN )
755
- if (IS_DARWIN )
753
+ if (${SWIFTLIB_SINGLE_SDK} IN_LIST SWIFT_APPLE_PLATFORMS )
756
754
list (APPEND SWIFTLIB_SINGLE_LINK_FLAGS "-Xlinker" "-current_version" "-Xlinker" "${SWIFT_COMPILER_VERSION} " "-Xlinker" "-compatibility_version" "-Xlinker" "1" )
757
755
endif ()
758
756
endif ()
@@ -1014,8 +1012,7 @@ function(_add_swift_library_single target name)
1014
1012
endforeach ()
1015
1013
endif ()
1016
1014
1017
- is_darwin_based_sdk ("${SWIFTLIB_SINGLE_SDK} " IS_DARWIN )
1018
- if (IS_DARWIN )
1015
+ if (${SWIFTLIB_SINGLE_SDK} IN_LIST SWIFT_APPLE_PLATFORMS )
1019
1016
set (install_name_dir "@rpath" )
1020
1017
1021
1018
if (SWIFTLIB_SINGLE_IS_STDLIB )
@@ -2084,8 +2081,7 @@ function(_add_swift_executable_single name)
2084
2081
list (APPEND link_flags "-Wl,-no_pie" )
2085
2082
endif ()
2086
2083
2087
- is_darwin_based_sdk ("${SWIFTEXE_SINGLE_SDK} " IS_DARWIN )
2088
- if (IS_DARWIN )
2084
+ if (${SWIFTEXE_SINGLE_SDK} IN_LIST SWIFT_APPLE_PLATFORMS )
2089
2085
list (APPEND link_flags
2090
2086
"-Xlinker" "-rpath"
2091
2087
"-Xlinker" "@executable_path/../lib/swift/${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK} _LIB_SUBDIR}" )
@@ -2227,8 +2223,7 @@ function(add_swift_target_executable name)
2227
2223
${SWIFTEXE_TARGET_DONT_STRIP_NON_MAIN_SYMBOLS_FLAG}
2228
2224
${SWIFTEXE_DISABLE_ASLR_FLAG} )
2229
2225
2230
- is_darwin_based_sdk ("${sdk} " IS_DARWIN )
2231
- if (IS_DARWIN )
2226
+ if (${sdk} IN_LIST SWIFT_APPLE_PLATFORMS )
2232
2227
add_custom_command_target (unused_var2
2233
2228
COMMAND "codesign" "-f" "-s" "-" "${SWIFT_RUNTIME_OUTPUT_INTDIR} /${VARIANT_NAME} "
2234
2229
CUSTOM_TARGET_NAME "${VARIANT_NAME} _signed"
0 commit comments