File tree Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Original file line number Diff line number Diff line change 2
2
include (AddSwift )
3
3
include (SwiftSource )
4
4
5
- function (is_darwin_based_sdk sdk_name out_var )
6
- if ("${sdk_name} " STREQUAL "OSX" OR
7
- "${sdk_name} " STREQUAL "IOS" OR
8
- "${sdk_name} " STREQUAL "IOS_SIMULATOR" OR
9
- "${sdk_name} " STREQUAL "TVOS" OR
10
- "${sdk_name} " STREQUAL "TVOS_SIMULATOR" OR
11
- "${sdk_name} " STREQUAL "WATCHOS" OR
12
- "${sdk_name} " STREQUAL "WATCHOS_SIMULATOR" )
13
- set (${out_var} TRUE PARENT_SCOPE )
14
- else ()
15
- set (${out_var} FALSE PARENT_SCOPE )
16
- endif ()
17
- endfunction ()
18
-
19
5
function (add_dependencies_multiple_targets )
20
6
cmake_parse_arguments (
21
7
ADMT # prefix
@@ -63,8 +49,7 @@ function(_add_target_variant_c_compile_link_flags)
63
49
64
50
set (result ${${CFLAGS_RESULT_VAR_NAME}} )
65
51
66
- is_darwin_based_sdk ("${CFLAGS_SDK} " IS_DARWIN )
67
- if (IS_DARWIN )
52
+ if ("${CFLAGS_SDK} " IN_LIST SWIFT_APPLE_PLATFORMS )
68
53
# Check if there's a specific OS deployment version needed for this invocation
69
54
if ("${CFLAGS_SDK} " STREQUAL "OSX" )
70
55
if (DEFINED maccatalyst_build_flavor )
@@ -113,7 +98,7 @@ function(_add_target_variant_c_compile_link_flags)
113
98
endif ()
114
99
endif ()
115
100
116
- if (IS_DARWIN )
101
+ if (" ${CFLAGS_SDK} " IN_LIST SWIFT_APPLE_PLATFORMS )
117
102
# We collate -F with the framework path to avoid unwanted deduplication
118
103
# of options by target_compile_options -- this way no undesired
119
104
# side effects are introduced should a new search path be added.
Original file line number Diff line number Diff line change @@ -210,8 +210,7 @@ function(_add_target_variant_swift_compile_flags
210
210
list (APPEND result "-sdk" "${SWIFT_SDK_${sdk} _ARCH_${arch} _PATH}" )
211
211
endif ()
212
212
213
- is_darwin_based_sdk ("${sdk} " IS_DARWIN )
214
- if (IS_DARWIN )
213
+ if ("${sdk} " IN_LIST SWIFT_APPLE_PLATFORMS )
215
214
set (sdk_deployment_version "${SWIFT_SDK_${sdk} _DEPLOYMENT_VERSION}" )
216
215
get_target_triple (target target_variant "${sdk} " "${arch} "
217
216
MACCATALYST_BUILD_FLAVOR "${VARIANT_MACCATALYST_BUILD_FLAVOR} "
@@ -237,7 +236,7 @@ function(_add_target_variant_swift_compile_flags
237
236
list (APPEND result "-resource-dir" "${SWIFTLIB_DIR} " )
238
237
endif ()
239
238
240
- if (IS_DARWIN )
239
+ if (" ${sdk} " IN_LIST SWIFT_APPLE_PLATFORMS )
241
240
# We collate -F with the framework path to avoid unwanted deduplication
242
241
# of options by target_compile_options -- this way no undesired
243
242
# side effects are introduced should a new search path be added.
You can’t perform that action at this time.
0 commit comments