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:47 (GMT)
commitb4971d086f2722ac9a77fa546c4ca4ecee4ed3cb (patch)
treec3305fe663d28c7791d5ad5633e6db37e9007ff3 /Modules
parent3fa9739b9fc3416db00bd88694db461537d83961 (diff)
parent321df5783d3a3d4708ce428b471254e63d9bdf5b (diff)
downloadCMake-b4971d086f2722ac9a77fa546c4ca4ecee4ed3cb.zip
CMake-b4971d086f2722ac9a77fa546c4ca4ecee4ed3cb.tar.gz
CMake-b4971d086f2722ac9a77fa546c4ca4ecee4ed3cb.tar.bz2
Merge topic 'swift-exe-rpath'
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 ")