Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 6c16484

Browse files
committed
Update libs layout
1 parent c024c8b commit 6c16484

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,14 @@ if(ENABLE_SWIFT)
6464
set(swift_dir swift_static)
6565
endif()
6666

67-
set(INSTALL_TARGET_DIR "${INSTALL_LIBDIR}/${swift_dir}/${swift_os}" CACHE PATH "Path where the libraries will be installed")
67+
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
68+
set(INSTALL_TARGET_DIR "${INSTALL_LIBDIR}/${swift_dir}/${swift_os}" CACHE PATH "Path where the libraries will be installed")
69+
set(INSTALL_TARGET_DIR_SWIFTMODULES "${INSTALL_LIBDIR}/${swift_dir}/${swift_os}/${swift_arch}" CACHE PATH "Path where the swiftmodules will be installed")
70+
else()
71+
set(INSTALL_TARGET_DIR "${INSTALL_LIBDIR}/${swift_dir}/${swift_os}/${swift_arch}" CACHE PATH "Path where the libraries will be installed")
72+
set(INSTALL_TARGET_DIR_SWIFTMODULES "${INSTALL_LIBDIR}/${swift_dir}/${swift_os}/${swift_arch}" CACHE PATH "Path where the swiftmodules will be installed")
73+
endif()
74+
6875
set(INSTALL_DISPATCH_HEADERS_DIR "${INSTALL_LIBDIR}/${swift_dir}/dispatch" CACHE PATH "Path where the headers will be installed for libdispatch")
6976
set(INSTALL_BLOCK_HEADERS_DIR "${INSTALL_LIBDIR}/${swift_dir}/Block" CACHE PATH "Path where the headers will be installed for the blocks runtime")
7077
set(INSTALL_OS_HEADERS_DIR "${INSTALL_LIBDIR}/${swift_dir}/os" CACHE PATH "Path where the os/ headers will be installed")

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ if(ENABLE_SWIFT)
263263
${CMAKE_CURRENT_BINARY_DIR}/swift/Dispatch.swiftmodule
264264
${CMAKE_CURRENT_BINARY_DIR}/swift/Dispatch.swiftdoc
265265
DESTINATION
266-
${INSTALL_TARGET_DIR}/${swift_arch})
266+
${INSTALL_TARGET_DIR_SWIFTMODULES})
267267

268268
if(BUILD_SHARED_LIBS)
269269
set(library_kind SHARED)

0 commit comments

Comments
 (0)