aboutsummaryrefslogtreecommitdiff
blob: 769b67313cfe96bb2c584bb5ba9f77f00b17d5b9 (plain)
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
Index: build/linux/unbundle/harfbuzz.gyp
diff --git a/build/linux/unbundle/harfbuzz.gyp b/build/linux/unbundle/harfbuzz.gyp
index 456dd384df2d5c57d9857cfb775d46ef87add2bc..93b2a69c12d7b7524fa0c2aa67b52136b779196d 100644
--- a/build/linux/unbundle/harfbuzz.gyp
+++ b/build/linux/unbundle/harfbuzz.gyp
@@ -3,24 +3,34 @@
 # found in the LICENSE file.
 
 {
+  'variables': {
+    # Check for presence of harfbuzz-icu library, use it if present.
+    'harfbuzz_libraries':
+        '<!(python <(DEPTH)/tools/compile_test/compile_test.py '
+        '--code "int main() { return 0; }" '
+        '--run-linker '
+        '--on-success "harfbuzz harfbuzz-icu" '
+        '--on-failure "harfbuzz" '
+        '-- -lharfbuzz-icu)',
+  },
   'targets': [
     {
       'target_name': 'harfbuzz-ng',
       'type': 'none',
       'cflags': [
-        '<!@(pkg-config --cflags harfbuzz)',
+        '<!@(pkg-config --cflags <(harfbuzz_libraries))',
       ],
       'direct_dependent_settings': {
         'cflags': [
-          '<!@(pkg-config --cflags harfbuzz)',
+          '<!@(pkg-config --cflags <(harfbuzz_libraries))',
         ],
       },
       'link_settings': {
         'ldflags': [
-          '<!@(pkg-config --libs-only-L --libs-only-other harfbuzz)',
+          '<!@(pkg-config --libs-only-L --libs-only-other <(harfbuzz_libraries))',
         ],
         'libraries': [
-          '<!@(pkg-config --libs-only-l harfbuzz)',
+          '<!@(pkg-config --libs-only-l <(harfbuzz_libraries))',
         ],
       },
     },