summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeSwiftInformation.cmake
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2019-08-08 16:31:42 (GMT)
committerSaleem Abdulrasool <compnerd@compnerd.org>2019-08-09 15:16:29 (GMT)
commit689be6235e5be32e8ee8e37801dde1fb1c5add2a (patch)
treec4d901a70e328d716bb2fc99dfa8e09e40980f08 /Modules/CMakeSwiftInformation.cmake
parent1996e0157826903f27f73825a01f83d53dc8fba4 (diff)
downloadCMake-689be6235e5be32e8ee8e37801dde1fb1c5add2a.zip
CMake-689be6235e5be32e8ee8e37801dde1fb1c5add2a.tar.gz
CMake-689be6235e5be32e8ee8e37801dde1fb1c5add2a.tar.bz2
Generator: support per-language link library flag
This enables the use of MSVC and Swift on Windows in a single project. MSVC uses no flag to indicate linked libraries while Swift uses `-l`. Add support for a language specific link library flag which takes precedence over the global `CMAKE_LINK_LIBRARY_FLAG` which preserves compatibility with earlier releases.
Diffstat (limited to 'Modules/CMakeSwiftInformation.cmake')
-rw-r--r--Modules/CMakeSwiftInformation.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake
index 54e441c..cb161a6 100644
--- a/Modules/CMakeSwiftInformation.cmake
+++ b/Modules/CMakeSwiftInformation.cmake
@@ -36,6 +36,7 @@ set(CMAKE_Swift_DEFINE_FLAG -D)
set(CMAKE_Swift_FRAMEWORK_SEARCH_FLAG "-F ")
set(CMAKE_Swift_LIBRARY_PATH_FLAG "-L ")
set(CMAKE_Swift_LIBRARY_PATH_TERMINATOR "")
+set(CMAKE_Swift_LINK_LIBRARY_FLAG "-l")
set(CMAKE_Swift_LINKER_WRAPPER_FLAG "-Xlinker" " ")
set(CMAKE_Swift_RESPONSE_FILE_LINK_FLAG @)