diff options
author | Brad King <brad.king@kitware.com> | 2023-01-18 15:56:13 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-01-18 15:56:23 (GMT) |
commit | 9ce1c870374dc1ab910ed921f41d03df75f254f3 (patch) | |
tree | a4cb001ddacb2c0b781496e7e62599432046dfc8 /Modules | |
parent | 4ad38700c9d1aa41bd8dc984215daafed0b94330 (diff) | |
parent | 44abf248486fca72e59a5a94f5c79b4914d2cfd8 (diff) | |
download | CMake-9ce1c870374dc1ab910ed921f41d03df75f254f3.zip CMake-9ce1c870374dc1ab910ed921f41d03df75f254f3.tar.gz CMake-9ce1c870374dc1ab910ed921f41d03df75f254f3.tar.bz2 |
Merge topic 'swift-ios'
44abf24848 Swift: Add comment about where platform-specific flags should go
9a013c9e9d Swift: Use macOS-style linker flags on iOS, tvOS, and watchOS too
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8070
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeSwiftInformation.cmake | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake index 62f7ef2..64c7519 100644 --- a/Modules/CMakeSwiftInformation.cmake +++ b/Modules/CMakeSwiftInformation.cmake @@ -20,16 +20,19 @@ endif() set(CMAKE_EXE_EXPORTS_Swift_FLAG "-emit-module -emit-module-path <SWIFT_MODULE> ${CMAKE_Swift_IMPLIB_LINKER_FLAGS}") set(CMAKE_INCLUDE_FLAG_Swift "-I ") -if(CMAKE_SYSTEM_NAME STREQUAL Darwin) + +# FIXME: Move compiler- and platform-specific flags to the above-included modules. +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS" + OR CMAKE_SYSTEM_NAME STREQUAL "tvOS" OR CMAKE_SYSTEM_NAME STREQUAL "watchOS") 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() - if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows) set(CMAKE_EXECUTABLE_RUNTIME_Swift_FLAG "-Xlinker -rpath -Xlinker ") set(CMAKE_SHARED_LIBRARY_RUNTIME_Swift_FLAG "-Xlinker -rpath -Xlinker ") - if(CMAKE_SYSTEM_NAME STREQUAL Darwin) + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS" + OR CMAKE_SYSTEM_NAME STREQUAL "tvOS" OR CMAKE_SYSTEM_NAME STREQUAL "watchOS") set(CMAKE_EXECUTABLE_RUNTIME_Swift_FLAG_SEP "") set(CMAKE_SHARED_LIBRARY_RUNTIME_Swift_FLAG_SEP "") else() |