File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,18 @@ add_subdirectory(_TestingInternals)
4848add_subdirectory (Testing)
4949
5050if (NOT SwiftTesting_BuildMacrosAsExecutables)
51- install (PROGRAMS "${INSTALL_DIR} /lib/libTestingMacros.dylib"
51+ # Hardcode the known library names based on system name as a workaround since
52+ # TestingMacros uses `ExternalProject` and we cannot directly query the
53+ # properties of its targets here.
54+ if ("${CMAKE_SYSTEM_NAME} " STREQUAL "Darwin" )
55+ set (SwiftTesting_TestingMacrosLibraryName "libTestingMacros.dylib" )
56+ elseif ("${CMAKE_SYSTEM_NAME} " STREQUAL "Linux" )
57+ set (SwiftTesting_TestingMacrosLibraryName "libTestingMacros.so" )
58+ else ()
59+ message (FATAL_ERROR "Unable to determine the library name for TestingMacros based on system name: ${CMAKE_SYSTEM_NAME} " )
60+ endif ()
61+
62+ install (PROGRAMS "${INSTALL_DIR} /lib/${SwiftTesting_TestingMacrosLibraryName} "
5263 # TODO: Finalize the install path
5364 DESTINATION lib/swift/host/plugins)
5465endif ()
You can’t perform that action at this time.
0 commit comments