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