forked from signalapp/libsignal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSignalClient.podspec
More file actions
67 lines (56 loc) · 2.41 KB
/
SignalClient.podspec
File metadata and controls
67 lines (56 loc) · 2.41 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
#
# Copyright 2020 Signal Messenger, LLC.
# SPDX-License-Identifier: AGPL-3.0-only
#
Pod::Spec.new do |s|
s.name = 'SignalClient'
s.version = '0.1.0'
s.summary = 'A Swift wrapper library for communicating with the Signal messaging service.'
s.homepage = 'https://github.com/signalapp/libsignal-client'
s.license = 'AGPL-3.0-only'
s.author = { 'Jack Lloyd' => 'jack@signal.org', 'Jordan Rose' => 'jrose@signal.org' }
s.source = { :git => 'https://github.com/signalapp/libsignal-client.git', :tag => "v#{s.version}" }
s.swift_version = '5'
s.platform = :ios, '10'
s.dependency 'SignalCoreKit'
s.source_files = ['swift/Sources/**/*.swift', 'swift/Sources/**/*.m']
s.preserve_paths = [
'bin/*',
'Cargo.toml',
'Cargo.lock',
'rust-toolchain',
'rust/*',
'swift/*.sh',
'swift/Sources/SignalFfi',
]
s.pod_target_xcconfig = {
'CARGO_BUILD_TARGET_DIR' => '$(DERIVED_FILE_DIR)/libsignal-ffi',
'CARGO_PROFILE_RELEASE_DEBUG' => '1', # enable line tables
'LIBSIGNAL_FFI_DIR' => '$(CARGO_BUILD_TARGET_DIR)/$(CARGO_BUILD_TARGET)/release',
'HEADER_SEARCH_PATHS' => '$(PODS_TARGET_SRCROOT)/swift/Sources/SignalFfi',
# Duplicate this here to make sure the search path is passed on to Swift dependencies.
'SWIFT_INCLUDE_PATHS' => '$(HEADER_SEARCH_PATHS)',
# Make sure we link the static library, not a dynamic one.
# Use an extra level of indirection because CocoaPods messes with OTHER_LDFLAGS too.
'LIBSIGNAL_FFI_LIB_IF_NEEDED' => '$(LIBSIGNAL_FFI_DIR)/libsignal_ffi.a',
'OTHER_LDFLAGS' => '$(LIBSIGNAL_FFI_LIB_IF_NEEDED)',
# Some day this will have to be updated for arm64 Macs (and the corresponding arm64 iOS simulator)
'CARGO_BUILD_TARGET[sdk=iphonesimulator*]' => 'x86_64-apple-ios',
'CARGO_BUILD_TARGET[sdk=iphoneos*]' => 'aarch64-apple-ios',
'CARGO_BUILD_TARGET[sdk=macosx*]' => 'x86_64-apple-darwin',
'ARCHS[sdk=iphonesimulator*]' => 'x86_64',
'ARCHS[sdk=iphoneos*]' => 'arm64',
}
s.script_phases = [
{ :name => 'Build libsignal-ffi',
:execution_position => :before_compile,
:script => '"${PODS_TARGET_SRCROOT}/swift/build_ffi.sh"',
}
]
s.test_spec 'Tests' do |test_spec|
test_spec.source_files = 'swift/Tests/*/*.swift'
test_spec.pod_target_xcconfig = {
'LIBSIGNAL_FFI_LIB_IF_NEEDED' => '',
}
end
end