File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -269,7 +269,9 @@ if(SwiftCore_ENABLE_VECTOR_TYPES)
269
269
"${CMAKE_CURRENT_BINARY_DIR} /SIMDVectorTypes.swift" )
270
270
endif ()
271
271
272
- set_target_properties (swiftCore PROPERTIES Swift_MODULE_NAME Swift )
272
+ set_target_properties (swiftCore PROPERTIES
273
+ LINKER_LANGUAGE CXX
274
+ Swift_MODULE_NAME Swift )
273
275
274
276
target_compile_definitions (swiftCore
275
277
PRIVATE
@@ -314,10 +316,15 @@ target_link_libraries(swiftCore
314
316
string (TOLOWER "${SwiftCore_OBJECT_FORMAT} " SwiftCore_OBJECT_FORMAT_lc )
315
317
if ("${SwiftCore_OBJECT_FORMAT_lc} " STREQUAL "elf" )
316
318
target_link_libraries (swiftCore INTERFACE
317
- swiftrt$<$<BOOL:NO>:> )
319
+ swiftrt )
318
320
elseif ("${SwiftCore_OBJECT_FORMAT_lc} " STREQUAL "coff" )
319
- target_link_libraries (swiftCore INTERFACE
320
- swiftrt$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:T> )
321
+ if (BUILD_SHARED_LIBS )
322
+ target_link_libraries (swiftCore INTERFACE
323
+ swiftrt )
324
+ else ()
325
+ target_link_libraries (swiftCore INTERFACE
326
+ swiftrtT )
327
+ endif ()
321
328
endif ()
322
329
323
330
target_link_options (swiftCore PUBLIC
Original file line number Diff line number Diff line change @@ -167,6 +167,10 @@ if("${SwiftCore_OBJECT_FORMAT}" STREQUAL "elfx")
167
167
COMPONENT SwiftCore_runtime
168
168
DESTINATION "${CMAKE_INSTALL_LIBDIR} /swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS} >>:_static>/${SwiftCore_PLATFORM_SUBDIR} /${SwiftCore_ARCH_SUBDIR} "
169
169
RENAME swiftrt.o )
170
+
171
+ install (TARGETS swiftrt
172
+ EXPORT SwiftCoreTargets
173
+ COMPONENT SwiftCore_runtime )
170
174
elseif ("${SwiftCore_OBJECT_FORMAT} " STREQUAL "coffx" )
171
175
add_library (swiftrtT OBJECT SwiftRT-COFF.cpp )
172
176
target_compile_definitions (swiftrtT PRIVATE
@@ -183,6 +187,10 @@ elseif("${SwiftCore_OBJECT_FORMAT}" STREQUAL "coffx")
183
187
COMPONENT SwiftCore_runtime
184
188
DESTINATION "${CMAKE_INSTALL_LIBDIR} /swift/${SwiftCore_PLATFORM_SUBDIR} /${SwiftCore_ARCH_SUBDIR} "
185
189
RENAME swiftrt.obj )
190
+
191
+ install (TARGETS swiftrtT swiftrt
192
+ EXPORT SwiftCoreTargets
193
+ COMPONENT SwiftCore_runtime )
186
194
elseif (NOT "${SwiftCore_OBJECT_FORMAT} " STREQUAL "x" )
187
195
message (SEND_ERROR "Unknown object format '${SwiftCore_OBJECT_FORMAT} '" )
188
196
endif ()
You can’t perform that action at this time.
0 commit comments