diff options
author | Brad King <brad.king@kitware.com> | 2020-02-18 16:21:13 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-02-18 16:21:46 (GMT) |
commit | 77b537cc35f239a72ccd8cddab6a35d9625c3c20 (patch) | |
tree | 3cc9f36b7dee1124619298f0f5de757c66bf1bb0 /Modules | |
parent | 2dad438980ee66f1fa51662dde761902c76335d1 (diff) | |
parent | 321df5783d3a3d4708ce428b471254e63d9bdf5b (diff) | |
download | CMake-77b537cc35f239a72ccd8cddab6a35d9625c3c20.zip CMake-77b537cc35f239a72ccd8cddab6a35d9625c3c20.tar.gz CMake-77b537cc35f239a72ccd8cddab6a35d9625c3c20.tar.bz2 |
Merge topic 'swift-exe-rpath' into release-3.17
321df5783d Swift: support `-rpath` for executables
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4365
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeSwiftInformation.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake index 848934c..ba242ec 100644 --- a/Modules/CMakeSwiftInformation.cmake +++ b/Modules/CMakeSwiftInformation.cmake @@ -29,6 +29,11 @@ endif() if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows) 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 ") + set(CMAKE_EXECUTABLE_RUNTIME_Swift_FLAG_SEP ":") + endif() endif() set(CMAKE_Swift_COMPILE_OPTIONS_TARGET "-target ") |