Skip to content

Instantly share code, notes, and snippets.

@tatewake
Created April 24, 2013 04:42
Show Gist options
  • Save tatewake/5449674 to your computer and use it in GitHub Desktop.
Save tatewake/5449674 to your computer and use it in GitHub Desktop.
GYP configurations example
{
'target_defaults': {
'configurations': {
'debug': {
'defines': [ 'GAMMA', ], #defines
}, # debug
}, # configurations
},
'targets': [
{
'target_name': 'Whatever',
'product_name': 'Whatever',
'type': 'executable',
'configurations': {
'debug': {
'defines': [ 'ALPHA', ], #defines
}, # debug
}, # configurations
},
{
'target_name': 'Yaddayadda',
'product_name': 'Yaddayadda',
'type': 'executable',
'configurations': {
'debug': {
'defines': [ 'BETA', ], #defines
}, # debug
}, # configurations
},
],
}
@tatewake
Copy link
Author

Call this file "something.gyp" and run:

gyp --depth=. something.gyp --generator-output=out

"GAMMA" will be defined in both projects, "ALPHA" will be defined only in the "Whatever" project, and "BETA" will be defined only in the "Yaddayadda" project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment