node-sword-interface 1.0.72 → 1.0.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/binding.gyp +21 -5
- package/package.json +1 -1
package/binding.gyp
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"variables": {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
# 1. Detect if we are on iOS
|
|
4
|
+
"is_ios%": "<!(python3 -c \"import os; sdk = os.environ.get('SDKROOT', ''); print(1 if 'iPhone' in sdk or os.environ.get('PLATFORM') == 'ios' else 0)\")",
|
|
5
|
+
|
|
6
|
+
# 2. Get the deployment target (e.g., '15.0') from env, default to '13.0'
|
|
7
|
+
"ios_ver%": "<!(python3 -c \"import os; print(os.environ.get('IPHONEOS_DEPLOYMENT_TARGET', '13.0'))\")",
|
|
8
|
+
|
|
9
|
+
# 3. Detect if it's a simulator build
|
|
10
|
+
"is_ios_sim%": "<!(python3 -c \"import os; print(1 if 'iPhoneSimulator' in os.environ.get('SDKROOT', '') else 0)\")",
|
|
11
|
+
|
|
12
|
+
# 4. Construct the full target triple dynamically
|
|
13
|
+
"ios_target": "<!(python3 -c \"import os; ver = os.environ.get('IPHONEOS_DEPLOYMENT_TARGET', '13.0'); suffix = '-simulator' if 'iPhoneSimulator' in os.environ.get('SDKROOT', '') else ''; print(f'arm64-apple-ios{ver}{suffix}')\")"
|
|
5
14
|
},
|
|
6
15
|
"targets": [
|
|
7
16
|
{
|
|
@@ -11,7 +20,7 @@
|
|
|
11
20
|
["is_ios==1", {
|
|
12
21
|
"xcode_settings": {
|
|
13
22
|
"SDKROOT": "iphoneos",
|
|
14
|
-
"IPHONEOS_DEPLOYMENT_TARGET": "
|
|
23
|
+
"IPHONEOS_DEPLOYMENT_TARGET": "<(ios_ver)"
|
|
15
24
|
},
|
|
16
25
|
'actions': [
|
|
17
26
|
{
|
|
@@ -112,11 +121,18 @@
|
|
|
112
121
|
],
|
|
113
122
|
"xcode_settings": {
|
|
114
123
|
"SDKROOT": "iphoneos",
|
|
115
|
-
"IPHONEOS_DEPLOYMENT_TARGET": "
|
|
124
|
+
"IPHONEOS_DEPLOYMENT_TARGET": "<(ios_ver)",
|
|
125
|
+
"ONLY_ACTIVE_ARCH": "YES",
|
|
126
|
+
"OTHER_CFLAGS": [
|
|
127
|
+
"-target <(ios_target)"
|
|
128
|
+
],
|
|
116
129
|
"OTHER_LDFLAGS": [
|
|
117
130
|
"-dynamiclib",
|
|
118
131
|
"-install_name @rpath/node_sword_interface.framework/node_sword_interface",
|
|
119
|
-
"-undefined dynamic_lookup"
|
|
132
|
+
"-undefined dynamic_lookup",
|
|
133
|
+
"-Wl,-bind_at_load",
|
|
134
|
+
"-all_load",
|
|
135
|
+
"-target <(ios_target)"
|
|
120
136
|
],
|
|
121
137
|
"MACH_O_TYPE": "mh_dylib",
|
|
122
138
|
"PRODUCT_TYPE": "com.apple.product-type.framework"
|