summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-02-18 16:21:13 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-02-18 16:21:46 (GMT)
commit77b537cc35f239a72ccd8cddab6a35d9625c3c20 (patch)
tree3cc9f36b7dee1124619298f0f5de757c66bf1bb0 /Modules
parent2dad438980ee66f1fa51662dde761902c76335d1 (diff)
parent321df5783d3a3d4708ce428b471254e63d9bdf5b (diff)
downloadCMake-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.cmake5
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 ")