summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2019-11-17 21:57:46 (GMT)
committerBrad King <brad.king@kitware.com>2019-11-18 15:04:09 (GMT)
commitff6c336127973d09ac7d20f846854bdebf384201 (patch)
treedd6adfab290564fe91c049a779345dd38ac3b98a /Modules
parenta1216139f800a403fa04478a79162d2ca0c6a2f8 (diff)
downloadCMake-ff6c336127973d09ac7d20f846854bdebf384201.zip
CMake-ff6c336127973d09ac7d20f846854bdebf384201.tar.gz
CMake-ff6c336127973d09ac7d20f846854bdebf384201.tar.bz2
Swift: support `-rpath` on Darwin
Darwin also has the concept of RPATH. Additionally, the flag is identical to that on other Unixish platforms. Simply avoid the `-rpath` handling on Windows. This enables the use of `BUILD_WITH_INSTALL_RPATH` and `INSTALL_RPATH` with Swift targets on Darwin.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeSwiftInformation.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake
index f2bf232..7cd9b28 100644
--- a/Modules/CMakeSwiftInformation.cmake
+++ b/Modules/CMakeSwiftInformation.cmake
@@ -24,7 +24,7 @@ elseif(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
set(CMAKE_SHARED_LIBRARY_SONAME_Swift_FLAG "-Xlinker -soname -Xlinker ")
endif()
-if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows AND NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
+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 ":")
endif()