-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReactNativeSmb.podspec
More file actions
60 lines (50 loc) · 1.98 KB
/
Copy pathReactNativeSmb.podspec
File metadata and controls
60 lines (50 loc) · 1.98 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
require "json"
Pod::Spec.new do |s|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
s.name = "ReactNativeSmb"
s.version = package.fetch("version")
s.summary = "A React Native Nitro module for SMB client functionality using libsmb2"
s.description = <<-DESC
A SMB client library for React Native applications using the libsmb2 C library, built using Nitro modules.
DESC
s.homepage = "https://github.com/cetapod/react-native-smb"
s.author = { "Cetapod" => "open-source@cetapod.com" }
s.platform = :ios, "12.0"
s.source = { :git => "https://github.com/cetapod/react-native-smb.git", :tag => "v#{s.version}" }
s.source_files = [
"cpp/shared/**/*.{cpp,hpp}",
"cpp/ios/**/*.{cpp,hpp,mm,m,h}"
]
s.header_mappings_dir = "cpp"
# React Native dependencies
s.dependency "React"
s.dependency "React-Core"
s.dependency "NitroModules"
# Transfer and tree orchestration headers are implementation details.
s.public_header_files = Dir["cpp/**/*.hpp"].reject do |header|
header.start_with?("cpp/shared/io/transfer/") || header == "cpp/shared/io/SmbCopyTree.hpp"
end
# Compiler settings
s.requires_arc = true
s.pod_target_xcconfig = {
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) FOLLY_NO_CONFIG FOLLY_MOBILE=1 FOLLY_USE_LIBCPP=1',
'HEADER_SEARCH_PATHS' => [
'$(inherited)',
'$(PODS_TARGET_SRCROOT)/cpp',
'$(PODS_TARGET_SRCROOT)/libsmb2/include',
'$(PODS_ROOT)/NitroModules',
'$(PODS_ROOT)/Headers/Private/NitroModules'
].join(' '),
'OTHER_CPLUSPLUSFLAGS' => '$(inherited) -std=c++20 -Wall'
}
s.user_target_xcconfig = {
'HEADER_SEARCH_PATHS' => [
'$(inherited)',
'$(PODS_ROOT)/ReactNativeSmb/cpp',
'$(PODS_TARGET_SRCROOT)/libsmb2/include',
'$(PODS_ROOT)/Headers/Private/NitroModules'
].join(' ')
}
# Modern XCFramework approach - automatically selects correct library
s.vendored_frameworks = "ios/libs/libsmb2.xcframework"
end