File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.15.1 )
2
2
3
3
project (SwiftTSC LANGUAGES C Swift )
4
-
4
+
5
5
set (SWIFT_VERSION 5 )
6
6
set (CMAKE_Swift_LANGUAGE_VERSION ${SWIFT_VERSION} )
7
7
if (CMAKE_VERSION VERSION_LESS 3.16 )
8
8
add_compile_options ($< $< COMPILE_LANGUAGE:Swift> :-swift-version$< SEMICOLON> ${SWIFT_VERSION} > )
9
9
endif ()
10
10
11
11
set (CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR} /swift )
12
-
12
+
13
13
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /lib )
14
14
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /lib )
15
15
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /bin )
16
16
17
17
option (BUILD_SHARED_LIBS "Build shared libraryes by default" YES )
18
18
19
+ find_package (dispatch QUIET )
20
+ find_package (Foundation QUIET )
21
+
19
22
add_subdirectory (Sources )
20
23
add_subdirectory (cmake/modules )
Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ add_library(TSCBasic
51
51
Tuple.swift )
52
52
target_link_libraries (TSCBasic PUBLIC
53
53
TSCLibc )
54
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin )
55
+ target_link_libraries (TSCBasic PUBLIC
56
+ Foundation )
57
+ endif ()
54
58
# NOTE(compnerd) workaround for CMake not setting up include flags yet
55
59
set_target_properties (TSCBasic PROPERTIES
56
60
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY} )
You can’t perform that action at this time.
0 commit comments