Skip to content

Commit f51e481

Browse files
committed
Rename dispatch_Swift_* to dispatch_*
1 parent a0def02 commit f51e481

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ add_compile_definitions($<$<COMPILE_LANGUAGE:C,CXX>:HAVE_CONFIG_H>)
308308
if(ENABLE_SWIFT)
309309
include(SwiftSupport)
310310

311-
set(INSTALL_TARGET_DIR "${CMAKE_INSTALL_LIBDIR}/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/${dispatch_Swift_PLATFORM}/${dispatch_Swift_ARCH}" CACHE PATH "Path where the libraries will be installed")
311+
set(INSTALL_TARGET_DIR "${CMAKE_INSTALL_LIBDIR}/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/${dispatch_PLATFORM}/${dispatch_ARCH}" CACHE PATH "Path where the libraries will be installed")
312312
set(INSTALL_DISPATCH_HEADERS_DIR "${CMAKE_INSTALL_LIBDIR}/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/dispatch" CACHE PATH "Path where the headers will be installed for libdispatch")
313313
set(INSTALL_BLOCK_HEADERS_DIR "${CMAKE_INSTALL_LIBDIR}/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/Block" CACHE PATH "Path where the headers will be installed for the blocks runtime")
314314
set(INSTALL_OS_HEADERS_DIR "${CMAKE_INSTALL_LIBDIR}/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/os" CACHE PATH "Path where the os/ headers will be installed")

cmake/modules/SwiftSupport.cmake

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include_guard()
22

3-
if(NOT dispatch_Swift_MODULE_TRIPLE OR NOT dispatch_Swift_ARCH OR NOT dispatch_Swift_PLATFORM)
3+
if(NOT dispatch_MODULE_TRIPLE OR NOT dispatch_ARCH OR NOT dispatch_PLATFORM)
44
# Get the target information from the Swift compiler.
55
set(module_triple_command "${CMAKE_Swift_COMPILER}" -print-target-info)
66
if(CMAKE_Swift_COMPILER_TARGET)
@@ -9,28 +9,28 @@ if(NOT dispatch_Swift_MODULE_TRIPLE OR NOT dispatch_Swift_ARCH OR NOT dispatch_S
99
execute_process(COMMAND ${module_triple_command} OUTPUT_VARIABLE target_info_json)
1010
endif()
1111

12-
if(NOT dispatch_Swift_MODULE_TRIPLE)
12+
if(NOT dispatch_MODULE_TRIPLE)
1313
string(JSON module_triple GET "${target_info_json}" "target" "moduleTriple")
14-
set(dispatch_Swift_MODULE_TRIPLE "${module_triple}" CACHE STRING "Triple used to install swiftmodule files")
15-
mark_as_advanced(dispatch_Swift_MODULE_TRIPLE)
14+
set(dispatch_MODULE_TRIPLE "${module_triple}" CACHE STRING "Triple used to install swiftmodule files")
15+
mark_as_advanced(dispatch_MODULE_TRIPLE)
1616
message(CONFIGURE_LOG "Swift module triple: ${module_triple}")
1717
endif()
1818

19-
if(NOT dispatch_Swift_ARCH)
19+
if(NOT dispatch_ARCH)
2020
if(CMAKE_Swift_COMPILER_VERSION VERSION_EQUAL 0.0.0 OR CMAKE_Swift_COMPILER_VERSION VERSION_GREATER_EQUAL 6.2)
2121
# For newer compilers, we can use the -print-target-info command to get the architecture.
2222
string(JSON module_arch GET "${target_info_json}" "target" "arch")
2323
else()
24-
# For older compilers, extract the value from `dispatch_Swift_MODULE_TRIPLE`.
25-
string(REGEX MATCH "^[^-]+" module_arch "${dispatch_Swift_MODULE_TRIPLE}")
24+
# For older compilers, extract the value from `dispatch_MODULE_TRIPLE`.
25+
string(REGEX MATCH "^[^-]+" module_arch "${dispatch_MODULE_TRIPLE}")
2626
endif()
2727

28-
set(dispatch_Swift_ARCH "${module_arch}" CACHE STRING "Arch folder name used to install libraries")
29-
mark_as_advanced(dispatch_Swift_ARCH)
30-
message(CONFIGURE_LOG "Swift arch: ${dispatch_Swift_ARCH}")
28+
set(dispatch_ARCH "${module_arch}" CACHE STRING "Arch folder name used to install libraries")
29+
mark_as_advanced(dispatch_ARCH)
30+
message(CONFIGURE_LOG "Swift arch: ${dispatch_ARCH}")
3131
endif()
3232

33-
if(NOT dispatch_Swift_PLATFORM)
33+
if(NOT dispatch_PLATFORM)
3434
if(CMAKE_Swift_COMPILER_VERSION VERSION_EQUAL 0.0.0 OR CMAKE_Swift_COMPILER_VERSION VERSION_GREATER_EQUAL 6.2)
3535
# For newer compilers, we can use the -print-target-info command to get the platform.
3636
string(JSON swift_platform GET "${target_info_json}" "target" "platform")
@@ -43,9 +43,9 @@ if(NOT dispatch_Swift_PLATFORM)
4343
endif()
4444
endif()
4545

46-
set(dispatch_Swift_PLATFORM "${swift_platform}" CACHE STRING "Platform folder name used to install libraries")
47-
mark_as_advanced(dispatch_Swift_PLATFORM)
48-
message(CONFIGURE_LOG "Swift platform: ${dispatch_Swift_PLATFORM}")
46+
set(dispatch_PLATFORM "${swift_platform}" CACHE STRING "Platform folder name used to install libraries")
47+
mark_as_advanced(dispatch_PLATFORM)
48+
message(CONFIGURE_LOG "Swift platform: ${dispatch_PLATFORM}")
4949
endif()
5050

5151
function(install_swift_module target)
@@ -54,14 +54,14 @@ function(install_swift_module target)
5454
set(module ${target})
5555
endif()
5656

57-
set(INSTALL_SWIFT_MODULE_DIR "${CMAKE_INSTALL_LIBDIR}/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/${dispatch_Swift_PLATFORM}" CACHE PATH "Path where the swift modules will be installed")
57+
set(INSTALL_SWIFT_MODULE_DIR "${CMAKE_INSTALL_LIBDIR}/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/${dispatch_PLATFORM}" CACHE PATH "Path where the swift modules will be installed")
5858

5959
install(
6060
FILES $<TARGET_PROPERTY:${target},Swift_MODULE_DIRECTORY>/${module}.swiftdoc
6161
DESTINATION ${INSTALL_SWIFT_MODULE_DIR}/${module}.swiftmodule
62-
RENAME ${dispatch_Swift_MODULE_TRIPLE}.swiftdoc)
62+
RENAME ${dispatch_MODULE_TRIPLE}.swiftdoc)
6363
install(
6464
FILES $<TARGET_PROPERTY:${target},Swift_MODULE_DIRECTORY>/${module}.swiftmodule
6565
DESTINATION ${INSTALL_SWIFT_MODULE_DIR}/${module}.swiftmodule
66-
RENAME ${dispatch_Swift_MODULE_TRIPLE}.swiftmodule)
66+
RENAME ${dispatch_MODULE_TRIPLE}.swiftmodule)
6767
endfunction()

0 commit comments

Comments
 (0)