|
| 1 | +# This source file is part of the Swift open source project |
| 2 | +# |
| 3 | +# Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors |
| 4 | +# Licensed under Apache License v2.0 with Runtime Library Exception |
| 5 | +# |
| 6 | +# See http://swift.org/LICENSE.txt for license information |
| 7 | +# See http://swift.org/CONTRIBUTORS.txt for Swift project authors |
| 8 | + |
| 9 | +add_library(PackageCollections |
| 10 | + API.swift |
| 11 | + Model/Collection.swift |
| 12 | + Model/CVE.swift |
| 13 | + Model/License.swift |
| 14 | + Model/PackageList.swift |
| 15 | + Model/PackageTypes.swift |
| 16 | + Model/Search.swift |
| 17 | + Model/TargetListResult.swift |
| 18 | + PackageCollections+CertificatePolicy.swift |
| 19 | + PackageCollections+Configuration.swift |
| 20 | + PackageCollections+Storage.swift |
| 21 | + PackageCollections+Validation.swift |
| 22 | + PackageCollections.swift |
| 23 | + PackageIndex+Configuration.swift |
| 24 | + PackageIndex.swift |
| 25 | + PackageIndexAndCollections.swift |
| 26 | + Providers/GitHubPackageMetadataProvider.swift |
| 27 | + Providers/JSONPackageCollectionProvider.swift |
| 28 | + Providers/PackageCollectionProvider.swift |
| 29 | + Providers/PackageMetadataProvider.swift |
| 30 | + Storage/FilepackageCollectionsSourcesStorage.swift |
| 31 | + Storage/PackageCollectionsSourcesStorage.swift |
| 32 | + Storage/PackageCollectionsStorage.swift |
| 33 | + Storage/SQLitePackageCollectionsStorage.swift |
| 34 | + Storage/Trie.swift |
| 35 | + Utility.swift) |
| 36 | +# NOTE(compnerd) workaround for CMake not setting up include flags yet |
| 37 | +set_target_properties(PackageCollections PROPERTIES |
| 38 | + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) |
| 39 | +target_link_libraries(PackageCollections PUBLIC |
| 40 | + $<$<NOT:$<PLATFORM_ID:Darwin>>:dispatch> |
| 41 | + $<$<NOT:$<PLATFORM_ID:Darwin>>:Foundation> |
| 42 | + Basics |
| 43 | + PackageCollectionsModel |
| 44 | + PackageCollectionsSigning |
| 45 | + PackageModel |
| 46 | + SourceControl |
| 47 | + TSCBasic) |
| 48 | + |
| 49 | +if(USE_CMAKE_INSTALL) |
| 50 | + install(TARGETS PackageCollections |
| 51 | + ARCHIVE DESTINATION lib |
| 52 | + LIBRARY DESTINATION lib |
| 53 | + RUNTIME DESTINATION bin) |
| 54 | +endif() |
| 55 | +set_property(GLOBAL APPEND PROPERTY SwiftPM_EXPORTS PackageCollections) |
0 commit comments