diff --git a/cmake/modules/AddSwift.cmake b/cmake/modules/AddSwift.cmake index 9977e5a904808..848dfa427213b 100644 --- a/cmake/modules/AddSwift.cmake +++ b/cmake/modules/AddSwift.cmake @@ -801,7 +801,7 @@ function(add_swift_host_library name) swift_install_in_component(TARGETS ${name} ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT dev LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT dev - RUNTIME DESTINATION bin COMPONENT dev) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT dev) endif() swift_is_installing_component(dev is_installing) @@ -947,7 +947,7 @@ function(add_swift_host_tool executable) add_dependencies(${ASHT_SWIFT_COMPONENT} ${executable}) swift_install_in_component(TARGETS ${executable} RUNTIME - DESTINATION bin + DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${ASHT_SWIFT_COMPONENT}) swift_is_installing_component(${ASHT_SWIFT_COMPONENT} is_installing) diff --git a/lib/SwiftDemangle/CMakeLists.txt b/lib/SwiftDemangle/CMakeLists.txt index 864bea94cc167..6ffcf1ce52922 100644 --- a/lib/SwiftDemangle/CMakeLists.txt +++ b/lib/SwiftDemangle/CMakeLists.txt @@ -9,7 +9,7 @@ target_link_libraries(swiftDemangle PRIVATE add_dependencies(compiler swiftDemangle) swift_install_in_component(TARGETS swiftDemangle RUNTIME - DESTINATION "bin" + DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT compiler LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" diff --git a/stdlib/cmake/modules/AddSwiftStdlib.cmake b/stdlib/cmake/modules/AddSwiftStdlib.cmake index 365b175587abe..e8d7bd4440354 100644 --- a/stdlib/cmake/modules/AddSwiftStdlib.cmake +++ b/stdlib/cmake/modules/AddSwiftStdlib.cmake @@ -2361,7 +2361,7 @@ function(add_swift_target_library name) add_dependencies(${SWIFTLIB_INSTALL_IN_COMPONENT} ${name}-windows-${SWIFT_PRIMARY_VARIANT_ARCH}) swift_install_in_component(TARGETS ${name}-windows-${SWIFT_PRIMARY_VARIANT_ARCH} RUNTIME - DESTINATION "bin" + DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT "${SWIFTLIB_INSTALL_IN_COMPONENT}" LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}/${SWIFT_PRIMARY_VARIANT_ARCH}" @@ -2945,7 +2945,7 @@ function(add_swift_target_executable name) add_dependencies(${install_in_component} ${name}-windows-${SWIFT_PRIMARY_VARIANT_ARCH}) swift_install_in_component(TARGETS ${name}-windows-${SWIFT_PRIMARY_VARIANT_ARCH} RUNTIME - DESTINATION "bin" + DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT "${install_in_component}" LIBRARY DESTINATION "libexec${LLVM_LIBDIR_SUFFIX}/swift/${resource_dir_sdk_subdir}/${SWIFT_PRIMARY_VARIANT_ARCH}" diff --git a/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake b/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake index 5c480dcd4a0ba..12f0e7d78be9a 100644 --- a/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake +++ b/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake @@ -285,7 +285,7 @@ macro(add_sourcekit_library name) DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT "${SOURCEKITLIB_INSTALL_IN_COMPONENT}" RUNTIME - DESTINATION "bin" + DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT "${SOURCEKITLIB_INSTALL_IN_COMPONENT}") swift_install_in_component(FILES ${SOURCEKITLIB_HEADERS} DESTINATION "include/SourceKit" @@ -464,7 +464,7 @@ macro(add_sourcekit_framework name) DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${SOURCEKITFW_INSTALL_IN_COMPONENT} RUNTIME - DESTINATION bin + DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${SOURCEKITFW_INSTALL_IN_COMPONENT}) else() set_output_directory(${name} diff --git a/tools/SourceKit/tools/complete-test/CMakeLists.txt b/tools/SourceKit/tools/complete-test/CMakeLists.txt index ec3437650a0bb..4e4bd065166a9 100644 --- a/tools/SourceKit/tools/complete-test/CMakeLists.txt +++ b/tools/SourceKit/tools/complete-test/CMakeLists.txt @@ -26,4 +26,4 @@ endif() add_dependencies(tools complete-test) swift_install_in_component(TARGETS complete-test - RUNTIME DESTINATION bin COMPONENT tools) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tools) diff --git a/tools/SourceKit/tools/sourcekitd-repl/CMakeLists.txt b/tools/SourceKit/tools/sourcekitd-repl/CMakeLists.txt index 20b37c5f779a9..cb5e44a079a2d 100644 --- a/tools/SourceKit/tools/sourcekitd-repl/CMakeLists.txt +++ b/tools/SourceKit/tools/sourcekitd-repl/CMakeLists.txt @@ -28,4 +28,4 @@ endif() add_dependencies(tools sourcekitd-repl) swift_install_in_component(TARGETS sourcekitd-repl - RUNTIME DESTINATION bin COMPONENT tools) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tools) diff --git a/tools/SourceKit/tools/sourcekitd-test/CMakeLists.txt b/tools/SourceKit/tools/sourcekitd-test/CMakeLists.txt index 91c28f371c4d6..c62d260d04de9 100644 --- a/tools/SourceKit/tools/sourcekitd-test/CMakeLists.txt +++ b/tools/SourceKit/tools/sourcekitd-test/CMakeLists.txt @@ -38,4 +38,4 @@ endif() add_dependencies(tools sourcekitd-test) swift_install_in_component(TARGETS sourcekitd-test - RUNTIME DESTINATION bin COMPONENT tools) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tools) diff --git a/tools/libStaticMirror/CMakeLists.txt b/tools/libStaticMirror/CMakeLists.txt index 1b8c563b05aae..d846e63fbf154 100644 --- a/tools/libStaticMirror/CMakeLists.txt +++ b/tools/libStaticMirror/CMakeLists.txt @@ -33,7 +33,7 @@ add_dependencies(static-mirror-lib libStaticMirror) swift_install_in_component(TARGETS libStaticMirror ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}" COMPONENT static-mirror-lib LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}" COMPONENT static-mirror-lib - RUNTIME DESTINATION "bin" COMPONENT static-mirror-lib) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT static-mirror-lib) swift_install_in_component(DIRECTORY "${SWIFT_MAIN_INCLUDE_DIR}/swift-c/StaticMirror/" DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${SWIFT_SCAN_LIB_NAME}" COMPONENT static-mirror-lib) diff --git a/tools/libSwiftScan/CMakeLists.txt b/tools/libSwiftScan/CMakeLists.txt index 6d2b7a8658ba0..f8dcf4e69013c 100644 --- a/tools/libSwiftScan/CMakeLists.txt +++ b/tools/libSwiftScan/CMakeLists.txt @@ -51,13 +51,13 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows) swift_install_in_component(TARGETS libSwiftScan ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}" COMPONENT compiler LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}" COMPONENT compiler - RUNTIME DESTINATION "bin" COMPONENT compiler) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT compiler) else() # On other platforms, instead install the library into 'lib/swift/host' and symlink to it from 'lib/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}' swift_install_in_component(TARGETS libSwiftScan ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/host" COMPONENT compiler LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/host" COMPONENT compiler - RUNTIME DESTINATION "bin" COMPONENT compiler) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT compiler) # Create a symlink to previously-used path of 'lib/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}' # to the new location under 'lib/swift/host' for clients of the legacy path.