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
319319string (TOLOWER "${SwiftCore_OBJECT_FORMAT} " SwiftCore_OBJECT_FORMAT_lc)
320320if ("${SwiftCore_OBJECT_FORMAT_lc} " STREQUAL "elf" )
321321 target_link_libraries (swiftCore INTERFACE
322- swiftrt$<$< BOOL : NO >:> )
322+ swiftrt)
323323elseif ("${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 ()
326331endif ()
327332
328333target_link_options (swiftCore PUBLIC
Original file line number Diff line number Diff line change @@ -167,6 +167,10 @@ if("${SwiftCore_OBJECT_FORMAT}" STREQUAL "elfx")
167167 COMPONENT SwiftCore_runtime
168168 DESTINATION "${CMAKE_INSTALL_LIBDIR} /swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS} >>:_static>/${SwiftCore_PLATFORM_SUBDIR} /${SwiftCore_ARCH_SUBDIR} "
169169 RENAME swiftrt.o)
170+
171+ install (TARGETS swiftrt
172+ EXPORT SwiftCoreTargets
173+ COMPONENT SwiftCore_runtime)
170174elseif ("${SwiftCore_OBJECT_FORMAT} " STREQUAL "coffx" )
171175 add_library (swiftrtT OBJECT SwiftRT-COFF.cpp)
172176 target_compile_definitions (swiftrtT PRIVATE
@@ -183,6 +187,10 @@ elseif("${SwiftCore_OBJECT_FORMAT}" STREQUAL "coffx")
183187 COMPONENT SwiftCore_runtime
184188 DESTINATION "${CMAKE_INSTALL_LIBDIR} /swift/${SwiftCore_PLATFORM_SUBDIR} /${SwiftCore_ARCH_SUBDIR} "
185189 RENAME swiftrt.obj)
190+
191+ install (TARGETS swiftrtT swiftrt
192+ EXPORT SwiftCoreTargets
193+ COMPONENT SwiftCore_runtime)
186194elseif (NOT "${SwiftCore_OBJECT_FORMAT} " STREQUAL "x" )
187195 message (SEND_ERROR "Unknown object format '${SwiftCore_OBJECT_FORMAT} '" )
188196endif ()
You can’t perform that action at this time.
0 commit comments