summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-07 17:38:02 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-07 17:38:02 +0000
commitdf011f44d3a667486592705ed0eca9d4a47f58dc (patch)
tree6ff361b987a23d9cdb2079607cd7993a108c3f0a
parentbdc56e165fb7cf8a40dcd2dd274ede146d1c3e1d (diff)
downloadchromium_src-df011f44d3a667486592705ed0eca9d4a47f58dc.zip
chromium_src-df011f44d3a667486592705ed0eca9d4a47f58dc.tar.gz
chromium_src-df011f44d3a667486592705ed0eca9d4a47f58dc.tar.bz2
Allow C/C++ targets to be suffixed for use in Native Client checkout.
Review URL: http://codereview.chromium.org/7320002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91723 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ppapi/ppapi.gyp11
-rw-r--r--ppapi/ppapi_cpp.gypi12
-rw-r--r--ppapi/ppapi_gl.gypi8
3 files changed, 21 insertions, 10 deletions
diff --git a/ppapi/ppapi.gyp b/ppapi/ppapi.gyp
index f1eb48f..fa850d5 100644
--- a/ppapi/ppapi.gyp
+++ b/ppapi/ppapi.gyp
@@ -9,6 +9,17 @@
{
'variables': {
'chromium_code': 1, # Use higher warning level.
+
+ # NaCl also uses the C and C++ PPAPI targets. We want it to be able to use
+ # its own version of PPAPI when compiling into Chrome, which means we'll
+ # actually have two instances of each library in the checkout (though not
+ # compiled into the same binary since NaCl is a shared library).
+ #
+ # This value is the suffix that will be appended to the relevant projects.
+ # In Chrome, it's empty so the projects have the same name. NaCl sets this
+ # to "_nacl" and includes the .gypi files below, giving it different names
+ # for these projects.
+ 'nacl_ppapi_library_suffix': '',
},
'target_defaults': {
'conditions': [
diff --git a/ppapi/ppapi_cpp.gypi b/ppapi/ppapi_cpp.gypi
index 1fbd940..768a992 100644
--- a/ppapi/ppapi_cpp.gypi
+++ b/ppapi/ppapi_cpp.gypi
@@ -5,7 +5,7 @@
{
'targets': [
{
- 'target_name': 'ppapi_c',
+ 'target_name': 'ppapi_c<(nacl_ppapi_library_suffix)',
'type': 'none',
'all_dependent_settings': {
'include_dirs': [
@@ -124,10 +124,10 @@
],
},
{
- 'target_name': 'ppapi_cpp_objects',
+ 'target_name': 'ppapi_cpp_objects<(nacl_ppapi_library_suffix)',
'type': 'static_library',
'dependencies': [
- 'ppapi_c'
+ 'ppapi_c<(nacl_ppapi_library_suffix)'
],
'include_dirs': [
'..',
@@ -264,11 +264,11 @@
],
},
{
- 'target_name': 'ppapi_cpp',
+ 'target_name': 'ppapi_cpp<(nacl_ppapi_library_suffix)',
'type': 'static_library',
'dependencies': [
- 'ppapi_c',
- 'ppapi_cpp_objects',
+ 'ppapi_c<(nacl_ppapi_library_suffix)',
+ 'ppapi_cpp_objects<(nacl_ppapi_library_suffix)',
],
'include_dirs': [
'..',
diff --git a/ppapi/ppapi_gl.gypi b/ppapi/ppapi_gl.gypi
index e9664de..64e46b4 100644
--- a/ppapi/ppapi_gl.gypi
+++ b/ppapi/ppapi_gl.gypi
@@ -8,10 +8,10 @@
],
'targets': [
{
- 'target_name': 'ppapi_egl',
+ 'target_name': 'ppapi_egl<(nacl_ppapi_library_suffix)',
'type': 'static_library',
'dependencies': [
- '<(DEPTH)/ppapi/ppapi.gyp:ppapi_c',
+ '<(DEPTH)/ppapi/ppapi.gyp:ppapi_c<(nacl_ppapi_library_suffix)',
],
'include_dirs': [
'lib/gl/include',
@@ -45,10 +45,10 @@
],
},
{
- 'target_name': 'ppapi_gles2',
+ 'target_name': 'ppapi_gles2<(nacl_ppapi_library_suffix)',
'type': 'static_library',
'dependencies': [
- 'ppapi_c',
+ 'ppapi_c<(nacl_ppapi_library_suffix)',
],
'include_dirs': [
'lib/gl/include',