Skip to content

Commit a017872

Browse files
authored
Merge pull request pvieito#19 from compnerd/different-paths
build: bifurcate the paths for Linux, Windows and macOS
2 parents f7f3fd8 + 1d08c06 commit a017872

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

‎PythonKit/CMakeLists.txt‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,17 @@ install(TARGETS PythonKit
1212
ARCHIVE DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/${swift_os}
1313
LIBRARY DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/${swift_os}
1414
RUNTIME DESTINATION bin)
15-
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PythonKit.swiftdoc
16-
DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/${swift_os}/PythonKit.swiftmodule
17-
RENAME ${swift_arch}.swiftdoc)
18-
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PythonKit.swiftmodule
19-
DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/${swift_os}/PythonKit.swiftmodule
20-
RENAME ${swift_arch}.swiftmodule)
15+
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
16+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/swift/PythonKit.swiftdoc
17+
DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/${swift_os}/PythonKit.swiftmodule
18+
RENAME ${swift_arch}.swiftdoc)
19+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/swift/PythonKit.swiftmodule
20+
DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/${swift_os}/PythonKit.swiftmodule
21+
RENAME ${swift_arch}.swiftmodule)
22+
else()
23+
install(FILES
24+
${CMAKE_CURRENT_BINARY_DIR}/swift/PythonKit.swiftdoc
25+
${CMAKE_CURRENT_BINARY_DIR}/swift/PythonKit.swiftmodule
26+
DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/${swift_os}/${swift_arch})
27+
endif()
2128
set_property(GLOBAL APPEND PROPERTY PythonKit_EXPORTS PythonKit)

0 commit comments

Comments
 (0)