summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeSwiftInformation.cmake
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2019-08-02 17:10:21 (GMT)
committerSaleem Abdulrasool <compnerd@compnerd.org>2019-08-06 00:29:41 (GMT)
commit2171f6ec0ea3ca373db94bc55d8b7db999de97cc (patch)
treef14b875f771365dcfe9f17aa2c377a5dfc2a257e /Modules/CMakeSwiftInformation.cmake
parent2327cc0e0575175e8dec4b7a6fa6cafd5d0f7ca9 (diff)
downloadCMake-2171f6ec0ea3ca373db94bc55d8b7db999de97cc.zip
CMake-2171f6ec0ea3ca373db94bc55d8b7db999de97cc.tar.gz
CMake-2171f6ec0ea3ca373db94bc55d8b7db999de97cc.tar.bz2
Swift: correct SONAME flag for Darwin targets
Adjust the build rules for Swift to fix the SONAME handling for Darwin.
Diffstat (limited to 'Modules/CMakeSwiftInformation.cmake')
-rw-r--r--Modules/CMakeSwiftInformation.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake
index 58b0813..54e441c 100644
--- a/Modules/CMakeSwiftInformation.cmake
+++ b/Modules/CMakeSwiftInformation.cmake
@@ -18,7 +18,9 @@ if(CMAKE_Swift_COMPILER_ID)
endif()
set(CMAKE_INCLUDE_FLAG_Swift "-I ")
-if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows AND NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
+if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
+ set(CMAKE_SHARED_LIBRARY_SONAME_Swift_FLAG "-Xlinker -install_name -Xlinker ")
+elseif(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
set(CMAKE_SHARED_LIBRARY_SONAME_Swift_FLAG "-Xlinker -soname -Xlinker ")
endif()