summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/common.gypi19
-rw-r--r--build/linux/system.gyp245
-rwxr-xr-xchrome/chrome.gyp4
-rw-r--r--third_party/protobuf2/protobuf.gyp3
4 files changed, 152 insertions, 119 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 700bdc0..37dcdce 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -667,8 +667,8 @@
],
}],
['target_arch=="arm"', {
- 'conditions': [
- ['armv7==1', {
+ 'target_conditions': [
+ ['armv7==1 and _toolset=="target"', {
'cflags': [
'-march=armv7-a',
'-mtune=cortex-a8',
@@ -679,12 +679,15 @@
],
}],
['sysroot!=""', {
- 'cflags': [
- '--sysroot=<(sysroot)',
- ],
- 'ldflags': [
- '--sysroot=<(sysroot)',
- ],
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'cflags': [
+ '--sysroot=<(sysroot)',
+ ],
+ 'ldflags': [
+ '--sysroot=<(sysroot)',
+ ],
+ }]]
}],
['no_strict_aliasing==1', {
'cflags': [
diff --git a/build/linux/system.gyp b/build/linux/system.gyp
index df71899..c48a08c 100644
--- a/build/linux/system.gyp
+++ b/build/linux/system.gyp
@@ -19,147 +19,174 @@
{
'target_name': 'gtk',
'type': 'settings',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-2.0 gthread-2.0)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l gtk+-2.0 gthread-2.0)',
- ],
- },
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-2.0 gthread-2.0)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l gtk+-2.0 gthread-2.0)',
+ ],
+ },
+ }]]
},
{
'target_name': 'gtkprint',
'type': 'settings',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)',
- ],
- },
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)',
+ ],
+ },
+ }]]
},
{
'target_name': 'nss',
'type': 'settings',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags nss)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l nss)',
- ],
- },
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags nss)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l nss)',
+ ],
+ },
+ }]]
},
{
'target_name': 'freetype2',
'type': 'settings',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags freetype2)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l freetype2)',
- ],
- },
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags freetype2)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l freetype2)',
+ ],
+ },
+ }]]
},
{
'target_name': 'fontconfig',
'type': 'settings',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags fontconfig)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l fontconfig)',
- ],
- },
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags fontconfig)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l fontconfig)',
+ ],
+ },
+ }]]
},
{
'target_name': 'gdk',
'type': 'settings',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags gdk-2.0)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l gdk-2.0)',
- ],
- },
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags gdk-2.0)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l gdk-2.0)',
+ ],
+ },
+ }]]
},
{
'target_name': 'gconf',
'type': 'settings',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags gconf-2.0)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
- ],
- },
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags gconf-2.0)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
+ ],
+ },
+ }]]
},
{
'target_name': 'x11',
'type': 'settings',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags x11)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other x11)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l x11)',
- ],
- },
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags x11)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other x11)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l x11)',
+ ],
+ },
+ }]]
},
{
'target_name': 'selinux',
'type': 'settings',
- 'link_settings': {
- 'libraries': [
- '-lselinux',
- ],
- },
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'link_settings': {
+ 'libraries': [
+ '-lselinux',
+ ],
+ },
+ }]]
},
# TODO(evanm): temporarily disabled while we figure out whether to depend
# on gnome-keyring etc.
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 1f0f6f4..c835772 100755
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -2895,7 +2895,7 @@
['chromeos==1 or toolkit_views==1',{
'dependencies': [
'../third_party/protobuf2/protobuf.gyp:protobuf_lite',
- '../third_party/protobuf2/protobuf.gyp:protoc',
+ '../third_party/protobuf2/protobuf.gyp:protoc#host',
'../third_party/cros/cros_api.gyp:cros_api',
],
'actions': [
@@ -5102,7 +5102,7 @@
],
'dependencies': [
'../third_party/protobuf2/protobuf.gyp:protobuf_lite',
- '../third_party/protobuf2/protobuf.gyp:protoc',
+ '../third_party/protobuf2/protobuf.gyp:protoc#host',
],
'export_dependent_settings': [
'../third_party/protobuf2/protobuf.gyp:protobuf_lite',
diff --git a/third_party/protobuf2/protobuf.gyp b/third_party/protobuf2/protobuf.gyp
index 18fdcd4..7b6d0db 100644
--- a/third_party/protobuf2/protobuf.gyp
+++ b/third_party/protobuf2/protobuf.gyp
@@ -38,6 +38,7 @@
{
'target_name': 'protobuf_lite',
'type': '<(library)',
+ 'toolsets': ['host', 'target'],
'sources': [
'src/src/google/protobuf/stubs/common.h',
'src/src/google/protobuf/stubs/once.h',
@@ -92,6 +93,7 @@
{
'target_name': 'protobuf',
'type': '<(library)',
+ 'toolsets': ['host'],
'sources': [
'src/src/google/protobuf/descriptor.h',
'src/src/google/protobuf/descriptor.pb.h',
@@ -149,6 +151,7 @@
{
'target_name': 'protoc',
'type': 'executable',
+ 'toolsets': ['host'],
'sources': [
'src/src/google/protobuf/compiler/code_generator.cc',
'src/src/google/protobuf/compiler/command_line_interface.cc',