File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -319,10 +319,15 @@ target_link_libraries(swiftCore
319
319
string (TOLOWER "${SwiftCore_OBJECT_FORMAT} " SwiftCore_OBJECT_FORMAT_lc )
320
320
if ("${SwiftCore_OBJECT_FORMAT_lc} " STREQUAL "elf" )
321
321
target_link_libraries (swiftCore INTERFACE
322
- swiftrt$<$<BOOL:NO>:> )
322
+ swiftrt )
323
323
elseif ("${SwiftCore_OBJECT_FORMAT_lc} " STREQUAL "coff" )
324
- target_link_libraries (swiftCore INTERFACE
325
- swiftrt$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:T> )
324
+ if (BUILD_SHARED_LIBS )
325
+ target_link_libraries (swiftCore INTERFACE
326
+ swiftrt )
327
+ else ()
328
+ target_link_libraries (swiftCore INTERFACE
329
+ swiftrtT )
330
+ endif ()
326
331
endif ()
327
332
328
333
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