Index: build/linux/system.gyp |
diff --git a/build/linux/system.gyp b/build/linux/system.gyp |
index df651fbd7ec16c392d1062f2f9dfebdbf408d29e..9d9ab32e3800551f868ca51de0a0f2f89f6c32c7 100644 |
--- a/build/linux/system.gyp |
+++ b/build/linux/system.gyp |
@@ -128,7 +128,7 @@ |
], |
}, |
{ |
- 'target_name': 'gtk', |
+ 'target_name': 'gtk2', |
'type': 'none', |
'toolsets': ['host', 'target'], |
'variables': { |
@@ -169,7 +169,7 @@ |
], |
}, |
{ |
- 'target_name': 'gtkprint', |
+ 'target_name': 'gtkprint2', |
'type': 'none', |
'conditions': [ |
['_toolset=="target"', { |
@@ -423,6 +423,74 @@ |
} |
], # targets |
}], |
+ ['use_gtk3==1', { |
+ # Hide GTK3 and related dependencies when use_gtk3==0 because the user |
+ # might not have the GTK3 headers yet. |
+ 'targets': [ |
+ { |
+ 'target_name': 'gtk3', |
+ 'type': 'none', |
+ 'toolsets': ['host', 'target'], |
+ 'variables': { |
+ # gtk requires gmodule, but it does not list it as a dependency |
+ # in some misconfigured systems. |
+ 'gtk_packages': 'gmodule-2.0 gtk+-3.0 gthread-2.0', |
+ }, |
+ 'conditions': [ |
+ ['_toolset=="target"', { |
+ 'all_dependent_settings': { |
+ 'cflags': [ |
+ '<!@(<(pkg-config) --cflags <(gtk_packages))', |
+ ], |
+ }, |
+ 'link_settings': { |
+ 'ldflags': [ |
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packages))', |
+ ], |
+ 'libraries': [ |
+ '<!@(<(pkg-config) --libs-only-l <(gtk_packages))', |
+ ], |
+ }, |
+ }, { |
+ 'all_dependent_settings': { |
+ 'cflags': [ |
+ '<!@(pkg-config --cflags <(gtk_packages))', |
+ ], |
+ }, |
+ 'link_settings': { |
+ 'ldflags': [ |
+ '<!@(pkg-config --libs-only-L --libs-only-other <(gtk_packages))', |
+ ], |
+ 'libraries': [ |
+ '<!@(pkg-config --libs-only-l <(gtk_packages))', |
+ ], |
+ }, |
+ }], |
+ ], |
+ }, |
+ { |
+ 'target_name': 'gtkprint3', |
+ 'type': 'none', |
+ 'conditions': [ |
+ ['_toolset=="target"', { |
+ 'direct_dependent_settings': { |
+ 'cflags': [ |
+ '<!@(<(pkg-config) --cflags gtk+-unix-print-3.0)', |
+ ], |
+ }, |
+ 'link_settings': { |
+ 'ldflags': [ |
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-3.0)', |
+ ], |
+ 'libraries': [ |
+ '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-3.0)', |
+ ], |
+ }, |
+ }], |
+ ], |
+ }, |
+ ], |
+ }], |
['use_x11==1 and chromeos==0', { |
'targets': [ |
{ |