File tree 3 files changed +40
-0
lines changed
3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,20 @@ set_target_properties(Foundation PROPERTIES
160
160
Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR} /swift
161
161
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_BINARY_DIR} /swift)
162
162
163
+ if (NOT BUILD_SHARED_LIBS )
164
+ # TODO(katei): Comment out after swift-frontend implementation
165
+ # https://github.com/apple/swift/pull/35936
166
+ # target_compile_options(Foundation
167
+ # PRIVATE
168
+ # "SHELL:-public-autolink-library icui18n")
169
+
170
+ # Merge private dependencies into single static objects archive
171
+ set_property (TARGET Foundation PROPERTY STATIC_LIBRARY_OPTIONS
172
+ $<TARGET_OBJECTS:CoreFoundation>
173
+ $<TARGET_OBJECTS:uuid>
174
+ $<TARGET_OBJECTS:BlocksRuntime>)
175
+ endif ()
176
+
163
177
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
164
178
# NOTE: workaround for CMake which doesn't link in OBJECT libraries properly
165
179
add_dependencies (Foundation CoreFoundationResources)
Original file line number Diff line number Diff line change @@ -64,6 +64,19 @@ target_link_libraries(FoundationNetworking
64
64
CFURLSessionInterface
65
65
PUBLIC
66
66
Foundation)
67
+
68
+ if (NOT BUILD_SHARED_LIBS )
69
+ # TODO(katei): Comment out after swift-frontend implementation
70
+ # https://github.com/apple/swift/pull/35936
71
+ # target_compile_options(FoundationNetworking
72
+ # PRIVATE
73
+ # "SHELL:-public-autolink-library curl")
74
+
75
+ # Merge private dependencies into single static objects archive
76
+ set_property (TARGET FoundationNetworking PROPERTY STATIC_LIBRARY_OPTIONS
77
+ $<TARGET_OBJECTS:CFURLSessionInterface>)
78
+ endif ()
79
+
67
80
set_target_properties (FoundationNetworking PROPERTIES
68
81
INSTALL_RPATH "$ORIGIN"
69
82
Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR} /swift
Original file line number Diff line number Diff line change @@ -16,6 +16,19 @@ target_link_libraries(FoundationXML
16
16
CFXMLInterface
17
17
PUBLIC
18
18
Foundation)
19
+
20
+ if (NOT BUILD_SHARED_LIBS )
21
+ # TODO(katei): Comment out after swift-frontend implementation
22
+ # https://github.com/apple/swift/pull/35936
23
+ # target_compile_options(FoundationXML
24
+ # PRIVATE
25
+ # "SHELL:-public-autolink-library xml2")
26
+
27
+ # Merge private dependencies into single static objects archive
28
+ set_property (TARGET FoundationXML PROPERTY STATIC_LIBRARY_OPTIONS
29
+ $<TARGET_OBJECTS:CFXMLInterface>)
30
+ endif ()
31
+
19
32
set_target_properties (FoundationXML PROPERTIES
20
33
INSTALL_RPATH "$ORIGIN"
21
34
Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR} /swift
You can’t perform that action at this time.
0 commit comments