Skip to content

Commit bb816e2

Browse files
committed
import from swift-package-manager (2020-01-06)
1 parent 37f8314 commit bb816e2

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
cmake_minimum_required(VERSION 3.15.1)
22

33
project(SwiftTSC LANGUAGES C Swift)
4-
4+
55
set(SWIFT_VERSION 5)
66
set(CMAKE_Swift_LANGUAGE_VERSION ${SWIFT_VERSION})
77
if(CMAKE_VERSION VERSION_LESS 3.16)
88
add_compile_options($<$<COMPILE_LANGUAGE:Swift>:-swift-version$<SEMICOLON>${SWIFT_VERSION}>)
99
endif()
1010

1111
set(CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift)
12-
12+
1313
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
1414
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
1515
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
1616

1717
option(BUILD_SHARED_LIBS "Build shared libraryes by default" YES)
1818

19+
find_package(dispatch QUIET)
20+
find_package(Foundation QUIET)
21+
1922
add_subdirectory(Sources)
2023
add_subdirectory(cmake/modules)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ and [llbuild](https://github.com/apple/swift-llbuild).
77
Development
88
-------------
99

10-
All changes to source files in this repository need to be done in the repository of the Swift Package Manager repository ([link](https://github.com/apple/swift-package-manager)) and then copied here using the Script in `Utilities/import` which looks for SwiftPM next to its own checkout (`../swiftpm`).
11-
All files under the TSC directory in [SwiftPM](https://github.com/apple/swift-package-manager) are part of the swift-tools-support-core and will be imported by the import script. The plan is to eventually move ownership to this repository.
10+
All changes to source files in this repository need to be done in the repository of the Swift Package Manager repository ([link](https://github.com/apple/swift-package-manager)) and then copied here using the Script in `Utilities/import` which takes the local path to the SwiftPM directory as input (or uses `../swiftpm` as default).
11+
All targets with a TSC prefix in [SwiftPM](https://github.com/apple/swift-package-manager) are part of the swift-tools-support-core and will be imported by the import script. The plan is to eventually move ownership to this repository.
1212

1313
License
1414
-------

Sources/TSCBasic/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ add_library(TSCBasic
5151
Tuple.swift)
5252
target_link_libraries(TSCBasic PUBLIC
5353
TSCLibc)
54+
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
55+
target_link_libraries(TSCBasic PUBLIC
56+
Foundation)
57+
endif()
5458
# NOTE(compnerd) workaround for CMake not setting up include flags yet
5559
set_target_properties(TSCBasic PROPERTIES
5660
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})

0 commit comments

Comments
 (0)