forked from loongly/PureScript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPureScript.podspec
113 lines (83 loc) · 4.13 KB
/
PureScript.podspec
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
Pod::Spec.new do |spec|
spec.name = "PureScript"
spec.version = "0.1.0"
spec.summary = "ScriptEngine module of [PureScript]"
spec.description = "ScriptEngine module of [PureScript]"
spec.homepage = "https://github.com/loonly/PureScript"
spec.license = "MIT"
spec.author = { "loonly" => "https://github.com/loonly/PureScript" }
spec.platform = :ios, '10.1'
spec.source = { :git => "https://github.com/loonly/PureScript.git", :tag => "#{spec.version}" }
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# CocoaPods is smart about how it includes source code. For source files
# giving a folder will include any swift, h, m, mm, c & cpp files.
# For header files it will include any header in the folder.
# Not including the public_header_files will make all headers public.
#
spec.source_files = "generated/*.{h,m,c,cpp}","lib/include/**/*.h"
#,"ScriptEngine.c","main/*.{h,m,c,cpp}", "custom/*.{h,m,c,cpp}"
#spec.exclude_files = "Classes/Exclude"
# spec.public_header_files = "Classes/**/*.h"
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. Anything else will be cleaned.
# You can preserve files from being cleaned, please don't preserve
# non-essential files like tests, examples and documentation.
#
spec.resources = "Managed"
#"Managed/*.{dll,aotdata,exe}"
#spec.resource_bundles = {'Managed' => ['Managed/*.{dll,aotdata,exe}']}
# spec.preserve_paths = "FilesToSave", "MoreFilesToSave"
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Link your library with frameworks, or libraries. Libraries do not include
# the lib prefix of their name.
#
# spec.framework = "SomeFramework"
spec.frameworks = "GSS", "UIKit","Foundation"
# spec.library = "iconv"
spec.libraries = "iconv", "z"
#,"il2cpp","iPhone-lib"
spec.static_framework = true
root_path = File.dirname(__FILE__)
flag_array = Array.new
flag_array.push("-L#{root_path}/lib")
flag_array.push("-L#{root_path}/aot")
flag_array.push("-lObjC")
flag_array.push("-force_load #{root_path}/lib/libmono-native-unified.a")
flag_array.push("-force_load #{root_path}/lib/libScriptEngine.a")
libdir = Dir::open("lib")
libdir.each do |f|
if f.include?(".a")
fname = f.sub(".a","").sub("lib","")
flag_array.push(%Q[-l"#{fname}"])
end
end
aotdir = Dir::open("aot")
aotdir.each do |f|
if f.include?(".a")
fname = f.sub(".a","").sub("lib","")
flag_array.push(%Q[-l"#{fname}"])
end
end
flag_array.push(%Q[-l"iconv"])
flag_array.push(%Q[-l"z"])
flag_array.push("$(inherited)")
spec.vendored_libraries = "lib/*.a", "aot/*.a"
#spec.header_dir = "lib/include"
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If your library depends on compiler flags you can set them in the xcconfig hash
# where they will only apply to your library. If you depend on other Podspecs
# you can include multiple dependencies to ensure it works.
# spec.requires_arc = true
spec.xcconfig = { "ENABLE_BITCODE" => "NO",
"HEADER_SEARCH_PATHS" => ["${PODS_TARGET_SRCROOT}/lib/include","${PODS_ROOT}/../Libraries/libil2cpp/include"] ,
"OTHER_LDFLAGS" => flag_array,
"GCC_PREPROCESSOR_DEFINITIONS" => "RUNTIME_IOS=1",
"LIBRARY_SEARCH_PATHS" => ["${PURESCRIPT_DIR}/lib","${PURESCRIPT_DIR}/aot"] #"${PODS_ROOT}/../Libraries"
}
# spec.dependency "JSONKit", "~> 1.4"
end