forked from bytedance/DanceUIGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDanceUIGraph.podspec
More file actions
142 lines (118 loc) · 8.15 KB
/
DanceUIGraph.podspec
File metadata and controls
142 lines (118 loc) · 8.15 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
source = 'https://github.com/bytedance/DanceUIGraph.git'
# "danceui_use_dynamic" is a global environment value that can be passed from
# cocoapods-danceui or other tooling to toggle dynamic frameworks.
is_dynamic = defined?(danceui_use_dynamic?) ? danceui_use_dynamic? : false
build_library_for_distribution = "YES"
if defined?(enable_distribution?)
build_library_for_distribution = enable_distribution? ? "YES" : build_library_for_distribution
end
build_library_for_distribution = "YES"
swift_version = '6.1.2'
swift_source_dir="$(PODS_TARGET_SRCROOT)/../DanceUIDependencies/swift/Source"
swift_build_tool="Ninja"
swift_build_mode="ReleaseAssert"
swift_product_name="swift"
swift_arch_type=`uname -m`
swift_build_platform="macosx-#{swift_arch_type}"
swift_build_dir="#{swift_source_dir}/build/#{swift_build_tool}-#{swift_build_mode}/#{swift_product_name}-#{swift_build_platform}/"
class Pod::Spec
# Version Manager defines: handle DanceUIGraph_POD_VERSION and DanceUIGraph_COMMIT_ID
def danceui_graph_version_manager_gcc_preprocessor_definitions
version_raw = "#{name}_POD_VERSION=@\\\"#{version}\\\""
commit_raw = ""
begin
commit_id = `git rev-parse --short=8 HEAD`.strip!
commit_raw = "#{name}_COMMIT_ID=@\\\"#{commit_id}\\\""
rescue
commit_raw = ""
end
"#{version_raw} #{commit_raw}".strip
end
end
Pod::Spec.new do |s|
s.name = 'DanceUIGraph'
s.version = '0.1.0'
s.summary = 'A short description of DanceUIGraph.'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
TODO: Add long description of the pod here.
DESC
s.homepage = 'https://github.com/bytedance/DanceUIGraph'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'Apache', :file => 'LICENSE' }
s.author = { 'bytedance' => 'bytedance@bytedance.com' }
s.source = { :git => source, :branch => 'release_'+s.version.to_s }
s.swift_versions = ['5.0', '5.1', '5.2', '5.3', '5.3.2', '5.5.1', '5.6.0', '5.9.0', '6.0']
s.pod_target_xcconfig = {
'PRODUCT_BUNDLE_IDENTIFIER': 'com.bytedance.danceui.graph',
'USER_HEADER_SEARCH_PATHS' => '$(inherited) $(PODS_TARGET_SRCROOT)/../DanceUIDependencies/boost ' +
'"$(PODS_TARGET_SRCROOT)/../DanceUIDependencies/" ',
'HEADER_SEARCH_PATHS' => '$(inherited) $(PODS_TARGET_SRCROOT)/DanceUIGraph/Sources/DanceUIGraph/include/ $(PODS_TARGET_SRCROOT)/DanceUIGraph/Sources/DanceUIGraph/umbrella/ $(PODS_TARGET_SRCROOT)/DanceUIGraph/Sources/DanceUIGraph/src/ $(PODS_TARGET_SRCROOT)/../DanceUIDependencies/boost/ $(PODS_ROOT)/DanceUIRuntime/Sources/DanceUIRuntime/include/ $(SWIFT_BASE_LOCATION)$(SWIFT_BUILD_LOCATION_NAME)/$(SWIFT_BUILD_TOOL_NAME)-$(SWIFT_BUILD_MODE_NAME)/swift-$(SWIFT_BUILD_PLATFORM_NAME)/include/ $(SWIFT_BASE_LOCATION)swift/include/ $(SWIFT_BASE_LOCATION)swift/stdlib/public/SwiftShims/ $(SWIFT_BASE_LOCATION)swift/include/ $(SWIFT_BASE_LOCATION)llvm-project/llvm/include/ $(SWIFT_BASE_LOCATION)$(SWIFT_BUILD_LOCATION_NAME)/$(SWIFT_BUILD_TOOL_NAME)-$(SWIFT_BUILD_MODE_NAME)/llvm-$(SWIFT_BUILD_PLATFORM_NAME)/include/ $(SWIFT_BASE_LOCATION)llvm-project/clang/include/ $(SWIFT_BASE_LOCATION)$(SWIFT_BUILD_LOCATION_NAME)/$(SWIFT_BUILD_TOOL_NAME)-$(SWIFT_BUILD_MODE_NAME)/llvm-$(SWIFT_BUILD_PLATFORM_NAME)/tools/clang/include $(SWIFT_BASE_LOCATION)cmark/src/ $(SWIFT_BASE_LOCATION)$(SWIFT_BUILD_LOCATION_NAME)/$(SWIFT_BUILD_TOOL_NAME)-$(SWIFT_BUILD_MODE_NAME)/cmark-$(SWIFT_BUILD_PLATFORM_NAME)/src/',
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
'ENABLE_NS_ASSERTIONS' => 'YES',
'OTHER_CPLUSPLUSFLAGS' => '$(OTHER_CFLAGS) -fno-aligned-allocation',
"OTHER_SWIFT_FLAGS" => '$(inherited) -no-verify-emitted-module-interface',
'LIBRARY_SEARCH_PATHS' => '$(SDKROOT)/usr/lib/swift',
"ARCHS" => "$(ARCHS_STANDARD_64_BIT)",
"BUILD_LIBRARY_FOR_DISTRIBUTION" => build_library_for_distribution,
'SWIFT_BASE_LOCATION' => "#{swift_source_dir}/",
'SWIFT_BUILD_LOCATION_NAME' => 'build',
'SWIFT_BUILD_TOOL_NAME' => "#{swift_build_tool}",
'SWIFT_BUILD_MODE_NAME' => "#{swift_build_mode}",
'SWIFT_BUILD_PLATFORM_NAME' => "#{swift_build_platform}",
'SWIFT_BUILD_LLVMLIB_MODE' => "#{swift_build_mode}",
'SWIFT_BUILD_SWIFTLIB_MODE' => "#{swift_build_mode}",
# VersionManager
"GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) #{s.danceui_graph_version_manager_gcc_preprocessor_definitions}"
}
s.ios.deployment_target = '13.0'
s.osx.deployment_target = '10.15'
non_arc_files = 'DanceUIGraph/Sources/DanceUIGraph/src/Graph/**/*.{mm}', 'DanceUIGraph/Sources/DanceUIGraph/src/Debugger/Dumper/GraphDumper.mm'
s.exclude_files = non_arc_files
s.subspec 'no-arc' do |sna|
sna.requires_arc = false
sna.source_files = non_arc_files
end
s.subspec 'core' do |ss|
ss.source_files = 'DanceUIGraph/Sources/DanceUIGraph/include/**/*', 'DanceUIGraph/Sources/DanceUIGraph/src/**/*', 'DanceUIGraph/Sources/DanceUIGraph/umbrella/DanceUIGraph.h'
ss.public_header_files = 'DanceUIGraph/Sources/DanceUIGraph/include/**/*.{h,hpp}', 'DanceUIGraph/Sources/DanceUIGraph/umbrella/DanceUIGraph.h'
ss.private_header_files = 'DanceUIGraph/Sources/DanceUIGraph/src/**/*.{h,hpp}'
ss.requires_arc = true
ss.dependency 'DanceUIGraph/no-arc'
ss.dependency 'DanceUIRuntime'
ss.library = 'c++'
ss.library = 'z'
end
s.default_subspec = 'core'
s.static_framework = !is_dynamic
s.test_spec 'UnitTests' do |test_spec|
test_spec.test_type = 'unit'
test_spec.pod_target_xcconfig = {
'USER_HEADER_SEARCH_PATHS' => '$(PODS_TARGET_SRCROOT)/../DanceUIDependencies/boost ' +
'"$(PODS_TARGET_SRCROOT)/../DanceUIDependencies/" ',
'HEADER_SEARCH_PATHS' => '$(PODS_TARGET_SRCROOT)/DanceUIGraph/Sources/DanceUIGraph/src/ $(PODS_TARGET_SRCROOT)/../DanceUIDependencies/boost/ $(PODS_ROOT)/DanceUIRuntime/Sources/DanceUIRuntime/include/ $(SWIFT_BASE_LOCATION)$(SWIFT_BUILD_LOCATION_NAME)/$(SWIFT_BUILD_TOOL_NAME)-$(SWIFT_BUILD_MODE_NAME)/swift-$(SWIFT_BUILD_PLATFORM_NAME)/include/ $(SWIFT_BASE_LOCATION)swift/include/ $(SWIFT_BASE_LOCATION)swift/stdlib/public/SwiftShims/ $(SWIFT_BASE_LOCATION)swift/include/ $(SWIFT_BASE_LOCATION)llvm-project/llvm/include/ $(SWIFT_BASE_LOCATION)$(SWIFT_BUILD_LOCATION_NAME)/$(SWIFT_BUILD_TOOL_NAME)-$(SWIFT_BUILD_MODE_NAME)/llvm-$(SWIFT_BUILD_PLATFORM_NAME)/include/ $(SWIFT_BASE_LOCATION)llvm-project/clang/include/ $(SWIFT_BASE_LOCATION)$(SWIFT_BUILD_LOCATION_NAME)/$(SWIFT_BUILD_TOOL_NAME)-$(SWIFT_BUILD_MODE_NAME)/llvm-$(SWIFT_BUILD_PLATFORM_NAME)/tools/clang/include $(SWIFT_BASE_LOCATION)cmark/src/ $(SWIFT_BASE_LOCATION)$(SWIFT_BUILD_LOCATION_NAME)/$(SWIFT_BUILD_TOOL_NAME)-$(SWIFT_BUILD_MODE_NAME)/cmark-$(SWIFT_BUILD_PLATFORM_NAME)/src/',
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
'ENABLE_NS_ASSERTIONS' => 'YES',
'OTHER_CPLUSPLUSFLAGS' => '$(OTHER_CFLAGS) -fno-aligned-allocation',
'LIBRARY_SEARCH_PATHS' => '$(SDKROOT)/usr/lib/swift',
"ARCHS" => "$(ARCHS_STANDARD_64_BIT)",
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" => "i386",
"GCC_PREPROCESSOR_DEFINITIONS" => '$(inherited) __DANCE_UI_GRAPH_ENABLE_TESTING__=1',
'SWIFT_BASE_LOCATION' => "#{swift_source_dir}/",
'SWIFT_BUILD_LOCATION_NAME' => 'build',
'SWIFT_BUILD_TOOL_NAME' => "#{swift_build_tool}",
'SWIFT_BUILD_MODE_NAME' => "#{swift_build_mode}",
'SWIFT_BUILD_PLATFORM_NAME' => "#{swift_build_platform}",
'SWIFT_BUILD_LLVMLIB_MODE' => "#{swift_build_mode}",
'SWIFT_BUILD_SWIFTLIB_MODE' => "#{swift_build_mode}"
}
test_spec.requires_app_host = true
test_spec.source_files = 'DanceUIGraph/UnitTests/**/*.{h,m,hpp,cpp,mm,c,cc,swift}'
test_spec.public_header_files = 'DanceUIGraph/Sources/DanceUIGraph/include/**/*.{h,hpp}'
test_spec.private_header_files = 'DanceUIGraph/Sources/DanceUIGraph/src/**/*.{h,hpp}'
end
end