Skip to content

Commit da214be

Browse files
committed
Copy more from CMake for _TestingInternals (?)
1 parent 04c164a commit da214be

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Sources/_TestDiscovery/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,12 @@ target_link_libraries(_TestDiscovery PRIVATE
1616
_TestingInternals)
1717

1818
_swift_testing_install_target(_TestDiscovery)
19+
20+
if(NOT BUILD_SHARED_LIBS)
21+
# When building a static library, install the internal library archive
22+
# alongside the main library. In shared library builds, the internal library
23+
# is linked into the main library and does not need to be installed separately.
24+
get_swift_testing_install_lib_dir(STATIC_LIBRARY lib_destination_dir)
25+
install(TARGETS _TestDiscovery
26+
ARCHIVE DESTINATION ${lib_destination_dir})
27+
endif()

0 commit comments

Comments
 (0)