File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,18 @@ add_subdirectory(_TestingInternals)
48
48
add_subdirectory (Testing)
49
49
50
50
if (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} "
52
63
# TODO: Finalize the install path
53
64
DESTINATION lib/swift/host/plugins)
54
65
endif ()
You can’t perform that action at this time.
0 commit comments