-
Notifications
You must be signed in to change notification settings - Fork 149
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
73 lines (68 loc) · 2.2 KB
/
Copy pathCMakeLists.txt
File metadata and controls
73 lines (68 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#[[
This source file is part of the Swift System open source project
Copyright (c) 2020 Apple Inc. and the Swift System project authors
Licensed under Apache License v2.0 with Runtime Library Exception
See https://swift.org/LICENSE.txt for license information
#]]
add_library(SystemPackage
Errno.swift
ErrnoWindows.swift
FileDescriptor.swift
FileHelpers.swift
FileOperations.swift
FilePermissions.swift
MachPort.swift
PlatformString.swift
SystemString.swift
Util.swift
Util+StringArray.swift
UtilConsumers.swift
WinSDK+Overlay.swift)
set_target_properties(SystemPackage PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
target_compile_options(SystemPackage PRIVATE
-enable-experimental-feature Lifetimes
"SHELL:-package-name swift-system")
target_sources(SystemPackage PRIVATE
FilePath/FilePath.swift
FilePath/FilePathComponents.swift
FilePath/FilePathComponentView.swift
FilePath/FilePathParsing.swift
FilePath/FilePathString.swift
FilePath/FilePathSyntax.swift
FilePath/FilePathTemp.swift
FilePath/FilePathTempPosix.swift
FilePath/FilePathTempWindows.swift
FilePath/FilePathWindows.swift)
target_sources(SystemPackage PRIVATE
FileSystem/FileFlags.swift
FileSystem/FileMode.swift
FileSystem/FileType.swift
FileSystem/Identifiers.swift
FileSystem/Stat.swift)
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
target_sources(SystemPackage PRIVATE
IORing/IOCompletion.swift
IORing/IORequest.swift
IORing/IORing.swift
IORing/IORing+Util.swift
IORing/PollEvents.swift
IORing/RawIORequest.swift)
endif()
target_sources(SystemPackage PRIVATE
Internals/Backcompat.swift
Internals/CInterop.swift
Internals/Constants.swift
Internals/Exports.swift
Internals/Mocking.swift
Internals/RawBuffer.swift
Internals/Syscalls.swift
Internals/WindowsSyscallAdapters.swift)
target_link_libraries(SystemPackage PUBLIC
CSystem)
set(SWIFT_SYSTEM_APPLE_PLATFORMS "Darwin" "iOS" "watchOS" "tvOS" "visionOS")
if(CMAKE_SYSTEM_NAME IN_LIST SWIFT_SYSTEM_APPLE_PLATFORMS)
target_compile_definitions(SystemPackage PRIVATE SYSTEM_PACKAGE_DARWIN)
endif()
_install_target(SystemPackage)
set_property(GLOBAL APPEND PROPERTY SWIFT_SYSTEM_EXPORTS SystemPackage)