mirror of
https://github.com/apple/swift-crypto
synced 2026-11-30 05:18:46 +00:00
* Exclude AES from CMake SwiftPM doesn't need it and this would allow removal of CCryptoBoringSSL dependency on non-Darwin platforms, thus reducing SwiftPM size. * Update update_cmakelists.sh to exclude AES source files
44 lines
1.4 KiB
CMake
44 lines
1.4 KiB
CMake
##===----------------------------------------------------------------------===##
|
|
##
|
|
## This source file is part of the SwiftCrypto open source project
|
|
##
|
|
## Copyright (c) 2023 Apple Inc. and the SwiftCrypto project authors
|
|
## Licensed under Apache License v2.0
|
|
##
|
|
## See LICENSE.txt for license information
|
|
## See CONTRIBUTORS.md for the list of SwiftCrypto project authors
|
|
##
|
|
## SPDX-License-Identifier: Apache-2.0
|
|
##
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
add_library(_CryptoExtras
|
|
"RSA/RSA.swift"
|
|
"RSA/RSA_boring.swift"
|
|
"RSA/RSA_security.swift"
|
|
"Util/BoringSSLHelpers.swift"
|
|
"Util/CryptoKitErrors_boring.swift"
|
|
"Util/DigestType.swift"
|
|
"Util/Error.swift"
|
|
"Util/PEMDocument.swift"
|
|
"Util/RandomBytes.swift")
|
|
|
|
target_include_directories(_CryptoExtras PRIVATE
|
|
$<TARGET_PROPERTY:CCryptoBoringSSL,INCLUDE_DIRECTORIES>
|
|
$<TARGET_PROPERTY:CCryptoBoringSSLShims,INCLUDE_DIRECTORIES>)
|
|
|
|
target_link_libraries(_CryptoExtras PUBLIC
|
|
$<$<NOT:$<PLATFORM_ID:Darwin>>:Foundation>
|
|
Crypto
|
|
CryptoBoringWrapper
|
|
CCryptoBoringSSL
|
|
CCryptoBoringSSLShims)
|
|
|
|
target_link_options(_CryptoExtras PRIVATE
|
|
"$<$<PLATFORM_ID:Darwin>:SHELL:-Xlinker -framework -Xlinker Security>")
|
|
|
|
set_target_properties(_CryptoExtras PROPERTIES
|
|
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
|
|
|
|
set_property(GLOBAL APPEND PROPERTY SWIFT_CRYPTO_EXPORTS _CryptoExtras)
|