diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2020-03-11 01:49:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-03-11 12:45:47 (GMT) |
commit | f481b3a947eaaae853c3e1675ba824246204c284 (patch) | |
tree | 25149d5a74fd7080392eecd47e6390adf328afc5 /Modules/CMakeSwiftInformation.cmake | |
parent | d1cb554c99c73e1486fbf4e09125337a7c0e9ea3 (diff) | |
download | CMake-f481b3a947eaaae853c3e1675ba824246204c284.zip CMake-f481b3a947eaaae853c3e1675ba824246204c284.tar.gz CMake-f481b3a947eaaae853c3e1675ba824246204c284.tar.bz2 |
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.
Diffstat (limited to 'Modules/CMakeSwiftInformation.cmake')
-rw-r--r-- | Modules/CMakeSwiftInformation.cmake | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake index ba242ec..8f0909c 100644 --- a/Modules/CMakeSwiftInformation.cmake +++ b/Modules/CMakeSwiftInformation.cmake @@ -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() |