Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,19 @@ if(NOT BUILD_SHARED_LIBS)
endif()

install(TARGETS CoreFoundation CFXMLInterface
DESTINATION lib/swift_static/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>)
DESTINATION ${CMAKE_INSTALL_LIBDIR}/swift_static/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>)

if(BUILD_NETWORKING)
set_property(GLOBAL APPEND PROPERTY Foundation_EXPORTS
CFURLSessionInterface)
install(TARGETS CFURLSessionInterface
DESTINATION lib/swift_static/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>)
DESTINATION ${CMAKE_INSTALL_LIBDIR}/swift_static/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>)
endif()
endif()

set(swift_lib_dir "lib/swift")
set(swift_lib_dir "${CMAKE_INSTALL_LIBDIR}/swift")
if(NOT BUILD_SHARED_LIBS)
set(swift_lib_dir "lib/swift_static")
set(swift_lib_dir "${CMAKE_INSTALL_LIBDIR}/swift_static")
endif()

# TODO(compnerd) install as a Framework as that is how swift actually is built
Expand Down
4 changes: 2 additions & 2 deletions Sources/BlocksRuntime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ set_target_properties(BlocksRuntime PROPERTIES
add_library(BlocksRuntime::BlocksRuntime ALIAS BlocksRuntime)

install(TARGETS BlocksRuntime
ARCHIVE DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>
LIBRARY DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>)
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>)
6 changes: 3 additions & 3 deletions Sources/UUID/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if(NOT BUILD_SHARED_LIBS)
# TODO(drexin): should be installed in architecture specific folder, once
# the layout is fixed for non-Darwin platforms
install(TARGETS uuid
ARCHIVE DESTINATION lib/swift_static/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>
LIBRARY DESTINATION lib/swift_static/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>
RUNTIME DESTINATION bin)
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/swift_static/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/swift_static/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
12 changes: 6 additions & 6 deletions cmake/modules/SwiftSupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ function(_install_target module)
endif()

install(TARGETS ${module}
ARCHIVE DESTINATION lib/${swift}/${swift_os}
LIBRARY DESTINATION lib/${swift}/${swift_os}
RUNTIME DESTINATION bin)
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/${swift}/${swift_os}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${swift}/${swift_os}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
if(type STREQUAL EXECUTABLE)
return()
endif()
Expand All @@ -83,15 +83,15 @@ function(_install_target module)

if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
install(FILES $<TARGET_PROPERTY:${module},Swift_MODULE_DIRECTORY>/${module_name}.swiftdoc
DESTINATION lib/${swift}/${swift_os}/${module_name}.swiftmodule
DESTINATION ${CMAKE_INSTALL_LIBDIR}/${swift}/${swift_os}/${module_name}.swiftmodule
RENAME ${swift_arch}.swiftdoc)
install(FILES $<TARGET_PROPERTY:${module},Swift_MODULE_DIRECTORY>/${module_name}.swiftmodule
DESTINATION lib/${swift}/${swift_os}/${module_name}.swiftmodule
DESTINATION ${CMAKE_INSTALL_LIBDIR}/${swift}/${swift_os}/${module_name}.swiftmodule
RENAME ${swift_arch}.swiftmodule)
else()
install(FILES
$<TARGET_PROPERTY:${module},Swift_MODULE_DIRECTORY>/${module_name}.swiftdoc
$<TARGET_PROPERTY:${module},Swift_MODULE_DIRECTORY>/${module_name}.swiftmodule
DESTINATION lib/${swift}/${swift_os}/${swift_arch})
DESTINATION ${CMAKE_INSTALL_LIBDIR}/${swift}/${swift_os}/${swift_arch})
endif()
endfunction()