Fix the install path for the toolchain
https://bugs.swift.org/browse/SR-6084
<rdar://problem/35040697> [SR-6084]: libdispatch missing from Trunk Development snapshots
diff --git a/dispatch/CMakeLists.txt b/dispatch/CMakeLists.txt
index b50b1ba..c13cfd8 100644
--- a/dispatch/CMakeLists.txt
+++ b/dispatch/CMakeLists.txt
@@ -14,12 +14,12 @@
source.h
time.h
DESTINATION
- ${CMAKE_INSTALL_FULL_INCLUDEDIR}/dispatch)
+ "${CMAKE_INSTALL_LIBDIR}/swift/dispatch")
if(ENABLE_SWIFT)
get_filename_component(MODULE_MAP module.modulemap REALPATH)
install(FILES
${MODULE_MAP}
DESTINATION
- ${CMAKE_INSTALL_FULL_INCLUDEDIR}/dispatch)
+ "${CMAKE_INSTALL_LIBDIR}/swift/dispatch")
endif()
diff --git a/os/CMakeLists.txt b/os/CMakeLists.txt
index 6e2b415..bd26097 100644
--- a/os/CMakeLists.txt
+++ b/os/CMakeLists.txt
@@ -6,5 +6,5 @@
object.h
linux_base.h
DESTINATION
- "${CMAKE_INSTALL_FULL_INCLUDEDIR}/os")
+ "${CMAKE_INSTALL_LIBDIR}/swift/os")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4d4bb2e..2d937a4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -202,7 +202,7 @@
install(TARGETS
dispatch
DESTINATION
- "${CMAKE_INSTALL_LIBDIR}")
+ "${CMAKE_INSTALL_LIBDIR}/swift/${SWIFT_OS}")
if(ENABLE_SWIFT)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/swift/Dispatch.swiftmodule