Skip to content

Commit f46b81d

Browse files
author
Gwen Mittertreiner
committed
Enable cmake install target on all platforms
Summary: The CMake files look like they are copied over from the SwiftPM CMake which does some custom installation when it bootstraps itself on non Windows platforms. Swift-driver doesn't do this, so there's no need to hide the install target on non Windows platforms.
1 parent 327cfd8 commit f46b81d

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ else()
3030
endif()
3131
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
3232

33-
option(BUILD_SHARED_LIBS "Build shared libraryes by default" YES)
33+
option(BUILD_SHARED_LIBS "Build shared libraries by default" YES)
3434

3535
find_package(TSC CONFIG REQUIRED)
3636

Sources/SwiftDriver/CMakeLists.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@ set_property(GLOBAL APPEND PROPERTY SWIFTDRIVER_EXPORTS SwiftDriver)
9393
set_target_properties(SwiftDriver PROPERTIES
9494
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
9595

96-
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
97-
install(TARGETS SwiftDriver
98-
ARCHIVE DESTINATION lib
99-
LIBRARY DESTINATION lib
100-
RUNTIME DESTINATION bin)
101-
endif()
96+
install(TARGETS SwiftDriver
97+
ARCHIVE DESTINATION lib
98+
LIBRARY DESTINATION lib
99+
RUNTIME DESTINATION bin)

Sources/SwiftOptions/CMakeLists.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ set_property(GLOBAL APPEND PROPERTY SWIFTDRIVER_EXPORTS SwiftOptions)
2525
set_target_properties(SwiftOptions PROPERTIES
2626
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
2727

28-
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
29-
install(TARGETS SwiftOptions
30-
ARCHIVE DESTINATION lib
31-
LIBRARY DESTINATION lib
32-
RUNTIME DESTINATION bin)
33-
endif()
28+
install(TARGETS SwiftOptions
29+
ARCHIVE DESTINATION lib
30+
LIBRARY DESTINATION lib
31+
RUNTIME DESTINATION bin)

0 commit comments

Comments
 (0)