Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit fe2f67c

Browse files
livecodefraserlivecodeian
authored andcommitted
Fix Android and Emscripten compilation issues
These were introduced with some of the changes required for proper Linux cross-compilation support.
1 parent bd35a20 commit fe2f67c

File tree

3 files changed

+37
-16
lines changed

3 files changed

+37
-16
lines changed

libfreetype/libfreetype.gyp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
'target_name': 'libfreetype',
1111
'type': 'static_library',
1212

13+
'toolsets': ['target', 'host'],
14+
1315
'variables':
1416
{
1517
'silence_warnings': 1,
@@ -167,11 +169,11 @@
167169
],
168170
},
169171

170-
'conditions':
172+
'target_conditions':
171173
[
172-
# This library is only required on Android
174+
# This library is only required on Emscripten and Android
173175
[
174-
'OS != "android" and OS != "emscripten"',
176+
'toolset_os not in ("emscripten", "android")',
175177
{
176178
'type': 'none',
177179
},

libharfbuzz/libharfbuzz.gyp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
'target_name': 'libharfbuzz',
1111
'type': 'static_library',
1212

13+
'toolsets': ['target', 'host'],
14+
1315
'variables':
1416
{
1517
'silence_warnings': 1,
@@ -78,6 +80,17 @@
7880
'../../prebuilt/include',
7981
],
8082
},
83+
84+
'target_conditions':
85+
[
86+
# This library is only required on Emscripten and Android
87+
[
88+
'toolset_os not in ("emscripten", "android")',
89+
{
90+
'type': 'none',
91+
},
92+
],
93+
],
8194
},
8295
],
8396
}

libskia/libskia.gyp

100644100755
Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,6 +1701,19 @@
17011701
['exclude', '/xps/'],
17021702
],
17031703

1704+
'conditions':
1705+
[
1706+
[
1707+
'OS in ("emscripten", "android")',
1708+
{
1709+
'dependencies':
1710+
[
1711+
'../libfreetype/libfreetype.gyp:libfreetype',
1712+
],
1713+
}
1714+
],
1715+
],
1716+
17041717
'target_conditions':
17051718
[
17061719
[
@@ -1837,12 +1850,6 @@
18371850
'SK_FONT_FILE_PREFIX="/boot/standalone/"',
18381851
],
18391852

1840-
'dependencies':
1841-
[
1842-
'../libexpat/libexpat.gyp:libexpat',
1843-
'../libfreetype/libfreetype.gyp:libfreetype',
1844-
],
1845-
18461853
'sources!':
18471854
[
18481855
'src/ports/SkDebug_stdio.cpp',
@@ -1901,22 +1908,21 @@
19011908
[
19021909
'toolset_os == "android"',
19031910
{
1904-
'dependencies':
1905-
[
1906-
'../libexpat/libexpat.gyp:libexpat',
1907-
'../libfreetype/libfreetype.gyp:libfreetype',
1908-
],
1909-
19101911
'defines':
19111912
[
19121913
'SK_BUILD_FOR_ANDROID',
19131914
'SK_BUILD_FOR_ANDROID_NDK',
19141915
],
19151916

19161917
# Need to include the cpufeatures module from the Android NDK
1918+
'variables':
1919+
{
1920+
# Default value because only Android defines the <(android_ndk_path) variable.
1921+
'android_ndk_path%': '',
1922+
},
19171923
'include_dirs':
19181924
[
1919-
'>(android_ndk_path)/sources/android/cpufeatures',
1925+
'<(android_ndk_path)/sources/android/cpufeatures',
19201926
],
19211927
'sources':
19221928
[

0 commit comments

Comments
 (0)