File tree Expand file tree Collapse file tree 1 file changed +27
-9
lines changed Expand file tree Collapse file tree 1 file changed +27
-9
lines changed Original file line number Diff line number Diff line change @@ -154,13 +154,31 @@ install(FILES
154154 ${CMAKE_CURRENT_BINARY_DIR} /swift/XCTest.swiftmodule
155155 DESTINATION
156156 ${CMAKE_INSTALL_FULL_LIBDIR} /swift/${swift_os} /${swift_host_arch} )
157- install (FILES
158- ${CMAKE_CURRENT_BINARY_DIR} /${CMAKE_SHARED_LIBRARY_PREFIX} XCTest${CMAKE_SHARED_LIBRARY_SUFFIX}
159- DESTINATION
160- ${CMAKE_INSTALL_FULL_LIBDIR} )
161- # NOTE(compnerd) stage a compatibility copy in the swift resource dir
162- install (FILES
163- ${CMAKE_CURRENT_BINARY_DIR} /${CMAKE_SHARED_LIBRARY_PREFIX} XCTest${CMAKE_SHARED_LIBRARY_SUFFIX}
164- DESTINATION
165- ${CMAKE_INSTALL_FULL_LIBDIR} /swift/${swift_os} )
166157
158+ if (BUILD_SHARED_LIBS )
159+ set (library_kind SHARED)
160+ set (swift_dir swift)
161+ else ()
162+ set (library_kind STATIC )
163+ set (swift_dir swift_static)
164+ endif ()
165+
166+ set (XCTest_OUTPUT_FILE
167+ ${CMAKE_CURRENT_BINARY_DIR} /${CMAKE_${library_kind} _LIBRARY_PREFIX}XCTest${CMAKE_${library_kind} _LIBRARY_SUFFIX})
168+
169+ if (CMAKE_SYSTEM_NAME STREQUAL Windows AND BUILD_SHARED_LIBS )
170+ install (FILES
171+ ${XCTest_OUTPUT_FILE}
172+ DESTINATION
173+ ${CMAKE_INSTALL_FULL_BINDIR} )
174+ install (FILES
175+ ${CMAKE_CURRENT_BINARY_DIR} /${CMAKE_IMPORT_LIBRARY_PREFIX} XCTest${CMAKE_IMPORT_LIBRARY_SUFFIX}
176+ DESTINATION
177+ ${CMAKE_INSTALL_FULL_LIBDIR} /${swift_dir} /${swift_os} )
178+ else ()
179+ # NOTE(compnerd) stage a compatibility copy in the swift resource dir
180+ install (FILES
181+ ${XCTest_OUTPUT_FILE}
182+ DESTINATION
183+ ${CMAKE_INSTALL_FULL_LIBDIR} /${swift_dir} /${swift_os} )
184+ endif ()
You can’t perform that action at this time.
0 commit comments