1Enabling Swift support is normally intended for building an overlay for a
2Swift SDK, which changes the installation layout. Prevent this.
3
4--- a/CMakeLists.txt
5+++ b/CMakeLists.txt
6@@ -287,7 +287,7 @@ configure_file("${PROJECT_SOURCE_DIR}/cmake/config.h.in"
7 add_compile_definitions($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:HAVE_CONFIG_H>)
8
9
10-if(ENABLE_SWIFT)
11+if(0)
12 set(INSTALL_TARGET_DIR "${CMAKE_INSTALL_LIBDIR}/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>" CACHE PATH "Path where the libraries will be installed")
13 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")
14 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")
15--- a/man/CMakeLists.txt
16+++ b/man/CMakeLists.txt
17@@ -1,6 +1,6 @@
18
19 # TODO(compnerd) add symlinks
20-if(NOT ENABLE_SWIFT)
21+if(1)
22 install(FILES
23 dispatch.3
24 dispatch_after.3
25--- a/src/swift/CMakeLists.txt
26+++ b/src/swift/CMakeLists.txt
27@@ -47,7 +47,7 @@ get_swift_host_arch(swift_arch)
28 install(FILES
29 ${CMAKE_CURRENT_BINARY_DIR}/swift/Dispatch.swiftmodule
30 ${CMAKE_CURRENT_BINARY_DIR}/swift/Dispatch.swiftdoc
31- DESTINATION ${INSTALL_TARGET_DIR}/${swift_arch})
32+ DESTINATION ${INSTALL_TARGET_DIR}/swift)
33 set_property(GLOBAL APPEND PROPERTY DISPATCH_EXPORTS swiftDispatch)
34 install(TARGETS swiftDispatch
35 EXPORT dispatchExports