|
| 1 | +#[[ |
| 2 | +This source file is part of the Swift System open source project |
| 3 | + |
| 4 | +Copyright (c) 2020 Apple Inc. and the Swift System project authors |
| 5 | +Licensed under Apache License v2.0 with Runtime Library Exception |
| 6 | + |
| 7 | +See https://swift.org/LICENSE.txt for license information |
| 8 | +#]] |
| 9 | + |
| 10 | +add_library(SystemPackage |
| 11 | + Errno.swift |
| 12 | + ErrnoWindows.swift |
| 13 | + FileDescriptor.swift |
| 14 | + FileHelpers.swift |
| 15 | + FileOperations.swift |
| 16 | + FilePermissions.swift |
| 17 | + MachPort.swift |
| 18 | + PlatformString.swift |
| 19 | + SystemString.swift |
| 20 | + Util.swift |
| 21 | + Util+StringArray.swift |
| 22 | + UtilConsumers.swift |
| 23 | + WinSDK+Overlay.swift) |
| 24 | +set_target_properties(SystemPackage PROPERTIES |
| 25 | + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) |
| 26 | +target_compile_options(SystemPackage PRIVATE |
| 27 | + -enable-experimental-feature Lifetimes |
| 28 | + "SHELL:-package-name swift-system") |
| 29 | +target_sources(SystemPackage PRIVATE |
| 30 | + FilePath/FilePath.swift |
| 31 | + FilePath/FilePathAnchor.swift |
| 32 | + FilePath/FilePathCodeUnits.swift |
| 33 | + FilePath/FilePathComponent.swift |
| 34 | + FilePath/FilePathComponentView.swift |
| 35 | + FilePath/FilePathDarwin.swift |
| 36 | + FilePath/FilePathDecomposition.swift |
| 37 | + FilePath/FilePathInternals.swift |
| 38 | + FilePath/FilePathParsing.swift |
| 39 | +<<<<<<< HEAD |
| 40 | + FilePath/FilePathString.swift |
| 41 | + FilePath/FilePathSyntax.swift |
| 42 | + FilePath/FilePathTemp.swift |
| 43 | + FilePath/FilePathTempPosix.swift |
| 44 | + FilePath/FilePathTempWindows.swift |
| 45 | + FilePath/FilePathWindows.swift) |
| 46 | +target_sources(SystemPackage PRIVATE |
| 47 | + FileSystem/FileFlags.swift |
| 48 | + FileSystem/FileMode.swift |
| 49 | + FileSystem/FileType.swift |
| 50 | + FileSystem/Identifiers.swift |
| 51 | + FileSystem/Stat.swift) |
| 52 | +if(CMAKE_SYSTEM_NAME STREQUAL Linux) |
| 53 | + target_sources(SystemPackage PRIVATE |
| 54 | + IORing/IOCompletion.swift |
| 55 | + IORing/IORequest.swift |
| 56 | + IORing/IORing.swift |
| 57 | + IORing/IORing+Util.swift |
| 58 | + IORing/RawIORequest.swift) |
| 59 | +endif() |
| 60 | +======= |
| 61 | + FilePath/FilePathResolve.swift |
| 62 | + FilePath/FilePathStringBridging.swift |
| 63 | + FilePath/FilePathSystemString.swift |
| 64 | + FilePath/FilePathWindows.swift) |
| 65 | +target_sources(SystemPackage PRIVATE |
| 66 | + SystemFilePath/FilePathCompatInternals.swift |
| 67 | + SystemFilePath/FilePathCompatShims.swift |
| 68 | + SystemFilePath/FilePathComponentCompat.swift |
| 69 | + SystemFilePath/FilePathComponents.swift |
| 70 | + SystemFilePath/FilePathConformances.swift |
| 71 | + SystemFilePath/FilePathString.swift |
| 72 | + SystemFilePath/FilePathSyntax.swift |
| 73 | + SystemFilePath/FilePathTemp.swift |
| 74 | + SystemFilePath/FilePathTempPosix.swift |
| 75 | + SystemFilePath/FilePathTempWindows.swift |
| 76 | + SystemFilePath/SystemStringShim.swift) |
| 77 | +>>>>>>> d17277b (wip: port to system, same module separate folders) |
| 78 | +target_sources(SystemPackage PRIVATE |
| 79 | + Internals/Backcompat.swift |
| 80 | + Internals/CInterop.swift |
| 81 | + Internals/Constants.swift |
| 82 | + Internals/Exports.swift |
| 83 | + Internals/Mocking.swift |
| 84 | + Internals/RawBuffer.swift |
| 85 | + Internals/Syscalls.swift |
| 86 | + Internals/WindowsSyscallAdapters.swift) |
| 87 | +target_link_libraries(SystemPackage PUBLIC |
| 88 | + CSystem) |
| 89 | + |
| 90 | +set(SWIFT_SYSTEM_APPLE_PLATFORMS "Darwin" "iOS" "watchOS" "tvOS" "visionOS") |
| 91 | +if(CMAKE_SYSTEM_NAME IN_LIST SWIFT_SYSTEM_APPLE_PLATFORMS) |
| 92 | + target_compile_definitions(SystemPackage PRIVATE SYSTEM_PACKAGE_DARWIN) |
| 93 | +endif() |
| 94 | + |
| 95 | +_install_target(SystemPackage) |
| 96 | +set_property(GLOBAL APPEND PROPERTY SWIFT_SYSTEM_EXPORTS SystemPackage) |
0 commit comments