File tree Expand file tree Collapse file tree 5 files changed +16
-13
lines changed Expand file tree Collapse file tree 5 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,14 @@ project(Foundation
13
13
LANGUAGES C Swift )
14
14
enable_testing ()
15
15
16
+ if (NOT SWIFT_SYSTEM_NAME )
17
+ if (CMAKE_SYSTEM_NAME STREQUAL Darwin )
18
+ set (SWIFT_SYSTEM_NAME macosx )
19
+ else ()
20
+ set (SWIFT_SYSTEM_NAME "$<LOWER_CASE:${CMAKE_SYSTEM_NAME} >" )
21
+ endif ()
22
+ endif ()
23
+
16
24
# NOTE(compnerd) default to /MD or /MDd by default based on the configuration.
17
25
# Cache the variable to allow the user to alter the configuration.
18
26
set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" CACHE
@@ -99,13 +107,13 @@ if(NOT BUILD_SHARED_LIBS)
99
107
endif ()
100
108
101
109
install (TARGETS CoreFoundation CFXMLInterface
102
- DESTINATION lib/swift_static/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}> )
110
+ DESTINATION lib/swift_static/${SWIFT_SYSTEM_NAME} )
103
111
104
112
if (BUILD_NETWORKING )
105
113
set_property (GLOBAL APPEND PROPERTY Foundation_EXPORTS
106
114
CFURLSessionInterface )
107
115
install (TARGETS CFURLSessionInterface
108
- DESTINATION lib/swift_static/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}> )
116
+ DESTINATION lib/swift_static/${SWIFT_SYSTEM_NAME} )
109
117
endif ()
110
118
endif ()
111
119
Original file line number Diff line number Diff line change @@ -11,5 +11,5 @@ set_target_properties(BlocksRuntime PROPERTIES
11
11
add_library (BlocksRuntime::BlocksRuntime ALIAS BlocksRuntime )
12
12
13
13
install (TARGETS BlocksRuntime
14
- ARCHIVE DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>
15
- LIBRARY DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}> )
14
+ ARCHIVE DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/${SWIFT_SYSTEM_NAME}
15
+ LIBRARY DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/${SWIFT_SYSTEM_NAME} )
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows")
28
28
endif ()
29
29
30
30
set_target_properties (plutil PROPERTIES
31
- INSTALL_RPATH "$ORIGIN/../lib/swift/$<LOWER_CASE: ${CMAKE_SYSTEM_NAME} > " )
31
+ INSTALL_RPATH "$ORIGIN/../lib/swift/${SWIFT_SYSTEM_NAME} " )
32
32
33
33
34
34
set_property (GLOBAL APPEND PROPERTY Foundation_EXPORTS plutil )
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ if(NOT BUILD_SHARED_LIBS)
28
28
# TODO(drexin): should be installed in architecture specific folder, once
29
29
# the layout is fixed for non-Darwin platforms
30
30
install (TARGETS uuid
31
- ARCHIVE DESTINATION lib/swift_static/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>
32
- LIBRARY DESTINATION lib/swift_static/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>
31
+ ARCHIVE DESTINATION lib/swift_static/${SWIFT_SYSTEM_NAME}
32
+ LIBRARY DESTINATION lib/swift_static/${SWIFT_SYSTEM_NAME}
33
33
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
34
34
endif ()
Original file line number Diff line number Diff line change @@ -49,12 +49,7 @@ endfunction()
49
49
# Sets ${result_var_name} with the converted OS name derived from
50
50
# CMAKE_SYSTEM_NAME.
51
51
function (get_swift_host_os result_var_name )
52
- if (CMAKE_SYSTEM_NAME STREQUAL Darwin )
53
- set (${result_var_name} macosx PARENT_SCOPE )
54
- else ()
55
- string (TOLOWER ${CMAKE_SYSTEM_NAME} cmake_system_name_lc )
56
- set (${result_var_name} ${cmake_system_name_lc} PARENT_SCOPE )
57
- endif ()
52
+ set (${result_var_name} ${SWIFT_SYSTEM_NAME} PARENT_SCOPE )
58
53
endfunction ()
59
54
60
55
function (_install_target module )
You can’t perform that action at this time.
0 commit comments