mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
Swift: repair RPATH handling for macOS
The configuration previously handled Linux properly but did not function on macOS as `ld64` does not support `:` delimited paths. Account for that by setting it to the empty string which will use multiple invocations of the `-Xlinker -rpath -Xlinker ...` pattern to compute the correct RPATH.
This commit is contained in:
committed by
Brad King
parent
d1cb554c99
commit
f481b3a947
@@ -27,12 +27,14 @@ elseif(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
|
||||
set(CMAKE_EXECUTABLE_RUNTIME_Swift_FLAG "-Xlinker -rpath -Xlinker ")
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_Swift_FLAG "-Xlinker -rpath -Xlinker ")
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_Swift_FLAG_SEP ":")
|
||||
|
||||
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
|
||||
set(CMAKE_EXECUTABLE_RUNTIME_Swift_FLAG "-Xlinker -rpath -Xlinker ")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
|
||||
set(CMAKE_EXECUTABLE_RUNTIME_Swift_FLAG_SEP "")
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_Swift_FLAG_SEP "")
|
||||
else()
|
||||
set(CMAKE_EXECUTABLE_RUNTIME_Swift_FLAG_SEP ":")
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_Swift_FLAG_SEP ":")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user