diff options
author | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-14 01:42:52 +0000 |
---|---|---|
committer | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-14 01:42:52 +0000 |
commit | 476035dd55c983f9c63ba5ab4a68d24bf2fedbb8 (patch) | |
tree | ee5ffef55b9b808206c6f044663fcc6b8855c938 | |
parent | 212a2e45865b81b1bb34b2a4b06d2f16fe4febfc (diff) | |
download | chromium_src-476035dd55c983f9c63ba5ab4a68d24bf2fedbb8.zip chromium_src-476035dd55c983f9c63ba5ab4a68d24bf2fedbb8.tar.gz chromium_src-476035dd55c983f9c63ba5ab4a68d24bf2fedbb8.tar.bz2 |
re-land r100988 (gpy refactoring for content dll).
TBR=darin
BUG=
TEST=
Review URL: http://codereview.chromium.org/7889027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101011 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/content.gyp | 177 | ||||
-rw-r--r-- | content/content_app.gypi | 9 | ||||
-rw-r--r-- | content/content_browser.gypi | 8 | ||||
-rw-r--r-- | content/content_common.gypi | 30 | ||||
-rw-r--r-- | content/content_gpu.gypi | 11 | ||||
-rw-r--r-- | content/content_plugin.gypi | 8 | ||||
-rw-r--r-- | content/content_ppapi_plugin.gypi | 7 | ||||
-rw-r--r-- | content/content_renderer.gypi | 8 | ||||
-rw-r--r-- | content/content_tests.gypi | 22 | ||||
-rw-r--r-- | content/content_utility.gypi | 8 | ||||
-rw-r--r-- | content/content_worker.gypi | 8 |
11 files changed, 199 insertions, 97 deletions
diff --git a/content/content.gyp b/content/content.gyp index fd7776d..20b8581 100644 --- a/content/content.gyp +++ b/content/content.gyp @@ -5,19 +5,178 @@ { 'variables': { 'chromium_code': 1, # Use higher warning level. + 'directxsdk_exists': '<!(python <(DEPTH)/build/dir_exists.py ../third_party/directxsdk)', }, 'includes': [ '../build/win_precompile.gypi', - 'content_app.gypi', - 'content_browser.gypi', - 'content_common.gypi', - 'content_gpu.gypi', - 'content_plugin.gypi', - 'content_ppapi_plugin.gypi', - 'content_renderer.gypi', 'content_shell.gypi', 'content_tests.gypi', - 'content_utility.gypi', - 'content_worker.gypi', + ], + 'conditions': [ + # In component mode, we build all of content as a single DLL. + # However, in the static mode, we need to build content as multiple + # targets in order to prevent dependencies from getting introduced + # upstream unnecessarily (e.g., content_renderer depends on allocator + # and chrome_exe depends on content_common but we don't want + # chrome_exe to have to depend on allocator). + # TODO(dpranke): Uncomment: ['component == "static_library"', { + ['1 == 1', { + 'target_defaults': { + 'defines': [ + 'CONTENT_IMPLEMENTATION', + ], + }, + 'targets': [ + {'target_name': 'content', + 'type': 'none', + 'dependencies': [ + 'content_app', + 'content_browser', + 'content_common', + 'content_gpu', + 'content_plugin', + 'content_ppapi_plugin', + 'content_renderer', + 'content_utility', + 'content_worker', + ], + }, + {'target_name': 'content_app', + 'type': 'static_library', + 'includes': [ + 'content_app.gypi', + ], + 'dependencies': [ + 'content_common', + ], + }, + {'target_name': 'content_browser', + 'type': 'static_library', + 'includes': [ + 'content_browser.gypi', + ], + 'dependencies': [ + 'content_common', + ], + }, + {'target_name': 'content_common', + 'type': 'static_library', + 'includes': [ + 'content_common.gypi', + ], + }, + {'target_name': 'content_gpu', + 'type': 'static_library', + 'includes': [ + 'content_gpu.gypi', + ], + 'dependencies': [ + 'content_common', + ], + }, + {'target_name': 'content_plugin', + 'type': 'static_library', + 'includes': [ + 'content_plugin.gypi', + ], + 'dependencies': [ + 'content_common', + ], + }, + {'target_name': 'content_ppapi_plugin', + 'type': 'static_library', + 'includes': [ + 'content_ppapi_plugin.gypi', + ], + }, + {'target_name': 'content_renderer', + 'type': 'static_library', + 'includes': [ + 'content_renderer.gypi', + ], + 'dependencies': [ + 'content_common', + ], + }, + {'target_name': 'content_utility', + 'type': 'static_library', + 'includes': [ + 'content_utility.gypi', + ], + 'dependencies': [ + 'content_common', + ], + }, + {'target_name': 'content_worker', + 'type': 'static_library', + 'includes': [ + 'content_worker.gypi', + ], + 'dependencies': [ + 'content_common', + ], + }, + ], + }, + { # component != static_library + 'target_defaults': { + 'defines': [ + 'CONTENT_IMPLEMENTATION', + ], + }, + 'targets': [ + {'target_name': 'content', + 'type': 'shared_library', + 'includes': [ + 'content_app.gypi', + 'content_browser.gypi', + 'content_common.gypi', + 'content_gpu.gypi', + 'content_plugin.gypi', + 'content_ppapi_plugin.gypi', + 'content_renderer.gypi', + 'content_utility.gypi', + 'content_worker.gypi', + ], + }, + {'target_name': 'content_app', + 'type': 'none', + 'dependencies': ['content', 'content_browser'], + }, + {'target_name': 'content_browser', + 'type': 'none', + 'dependencies': ['content'], + }, + {'target_name': 'content_common', + 'type': 'none', + 'dependencies': ['content'], + }, + {'target_name': 'content_gpu', + 'type': 'none', + 'dependencies': ['content'], + }, + {'target_name': 'content_plugin', + 'type': 'none', + 'dependencies': ['content'], + }, + {'target_name': 'content_ppapi_plugin', + 'type': 'none', + 'dependencies': ['content'], + }, + {'target_name': 'content_renderer', + 'type': 'none', + 'dependencies': ['content'], + }, + {'target_name': 'content_utility', + 'type': 'none', + 'dependencies': ['content'], + }, + {'target_name': 'content_worker', + 'type': 'none', + 'dependencies': ['content'], + }, + ], + }, + ], ], } diff --git a/content/content_app.gypi b/content/content_app.gypi index afb9c2b..996df28 100644 --- a/content/content_app.gypi +++ b/content/content_app.gypi @@ -3,16 +3,11 @@ # found in the LICENSE file. { - 'targets': [ - { - 'target_name': 'content_app', - 'type': 'static_library', + # TODO(dpranke): Fix indentation 'include_dirs': [ '..', ], 'dependencies': [ - 'content_browser', - 'content_common', '../base/base.gyp:base', '../base/base.gyp:base_i18n', '../crypto/crypto.gyp:crypto', @@ -33,6 +28,4 @@ ], }], ], - }, - ], } diff --git a/content/content_browser.gypi b/content/content_browser.gypi index d0d448a..03aa89f 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -3,12 +3,8 @@ # found in the LICENSE file. { - 'targets': [ - { - 'target_name': 'content_browser', - 'type': 'static_library', + # TODO(dpranke): Fix indentation. 'dependencies': [ - 'content_common', '../crypto/crypto.gyp:crypto', '../net/net.gyp:net', '../net/net.gyp:http_server', @@ -629,6 +625,4 @@ ], }], ], - }, - ], } diff --git a/content/content_common.gypi b/content/content_common.gypi index 2aa7cb7..9e091d8 100644 --- a/content/content_common.gypi +++ b/content/content_common.gypi @@ -3,10 +3,7 @@ # found in the LICENSE file. { - 'targets': [ - { - 'target_name': 'content_common', - 'type': 'static_library', + # TODO(dpranke): Fix indentation. 'dependencies': [ '../base/base.gyp:base', '../gpu/gpu.gyp:gpu_ipc', @@ -324,29 +321,4 @@ }, }], ], - }, - ], - - 'conditions': [ - ['target_arch=="arm"', { - 'targets': [ - { - 'target_name': 'omx_video_decode_accelerator_unittest', - 'type': 'executable', - 'dependencies': [ - 'content_common', - '../testing/gtest.gyp:gtest', - ], - 'include_dirs': [ - '<(DEPTH)/third_party/angle/include', - '<(DEPTH)/third_party/openmax/il', - ], - 'sources': [ - 'common/gpu/media/omx_video_decode_accelerator_unittest.cc', - ], - } - ], - }, - ], - ], } diff --git a/content/content_gpu.gypi b/content/content_gpu.gypi index 15fa0c8..5d89a61 100644 --- a/content/content_gpu.gypi +++ b/content/content_gpu.gypi @@ -3,15 +3,8 @@ # found in the LICENSE file. { - 'variables': { - 'directxsdk_exists': '<!(python <(DEPTH)/build/dir_exists.py ../third_party/directxsdk)', - }, # variables - 'targets': [ - { - 'target_name': 'content_gpu', - 'type': 'static_library', + # TODO(dpranke): Fix indentation. 'dependencies': [ - 'content_common', '../base/base.gyp:base', '../skia/skia.gyp:skia', '../ui/gfx/gl/gl.gyp:gl', @@ -92,6 +85,4 @@ ], }], ], - }, - ], } diff --git a/content/content_plugin.gypi b/content/content_plugin.gypi index f2f01bf..9ab27e1 100644 --- a/content/content_plugin.gypi +++ b/content/content_plugin.gypi @@ -3,12 +3,8 @@ # found in the LICENSE file. { - 'targets': [ - { - 'target_name': 'content_plugin', - 'type': 'static_library', + # TODO(dpranke): Fix indentation. 'dependencies': [ - 'content_common', '../skia/skia.gyp:skia', '../third_party/npapi/npapi.gyp:npapi', '../webkit/support/webkit_support.gyp:glue', @@ -64,6 +60,4 @@ }, }], ], - }, - ], } diff --git a/content/content_ppapi_plugin.gypi b/content/content_ppapi_plugin.gypi index dfa320a..9efd3e1 100644 --- a/content/content_ppapi_plugin.gypi +++ b/content/content_ppapi_plugin.gypi @@ -3,10 +3,7 @@ # found in the LICENSE file. { - 'targets': [ - { - 'target_name': 'content_ppapi_plugin', - 'type': 'static_library', + # TODO(dpranke): Fix indentation. 'dependencies': [ '../base/base.gyp:base', '../ppapi/ppapi_internal.gyp:ppapi_proxy', @@ -37,6 +34,4 @@ }, }], ], - }, - ], } diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi index bdfeb51..94c1617 100644 --- a/content/content_renderer.gypi +++ b/content/content_renderer.gypi @@ -3,12 +3,8 @@ # found in the LICENSE file. { - 'targets': [ - { - 'target_name': 'content_renderer', - 'type': 'static_library', + # TODO(dpranke): Fix indentation. 'dependencies': [ - 'content_common', '../jingle/jingle.gyp:jingle_glue', '../net/net.gyp:net', '../ppapi/ppapi_internal.gyp:ppapi_proxy', @@ -251,6 +247,4 @@ ], }], ], - }, - ], } diff --git a/content/content_tests.gypi b/content/content_tests.gypi index 92c0bcb..fb1f4e0 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -172,4 +172,26 @@ ], }, ], + 'conditions': [ + ['target_arch=="arm"', { + 'targets': [ + { + 'target_name': 'omx_video_decode_accelerator_unittest', + 'type': 'executable', + 'dependencies': [ + 'content', + '../testing/gtest.gyp:gtest', + ], + 'include_dirs': [ + '<(DEPTH)/third_party/angle/include', + '<(DEPTH)/third_party/openmax/il', + ], + 'sources': [ + 'common/gpu/media/omx_video_decode_accelerator_unittest.cc', + ], + } + ], + }, + ], + ], } diff --git a/content/content_utility.gypi b/content/content_utility.gypi index f3f8c65..0d2f700 100644 --- a/content/content_utility.gypi +++ b/content/content_utility.gypi @@ -3,12 +3,8 @@ # found in the LICENSE file. { - 'targets': [ - { - 'target_name': 'content_utility', - 'type': 'static_library', + # TODO(dpranke): Fix indentation. 'dependencies': [ - 'content_common', '../base/base.gyp:base', ], 'sources': [ @@ -29,6 +25,4 @@ }, }], ], - }, - ], } diff --git a/content/content_worker.gypi b/content/content_worker.gypi index 7ac57fe..48869df 100644 --- a/content/content_worker.gypi +++ b/content/content_worker.gypi @@ -3,12 +3,8 @@ # found in the LICENSE file. { - 'targets': [ - { - 'target_name': 'content_worker', - 'type': 'static_library', + # TODO(dpranke): Fix indentation. 'dependencies': [ - 'content_common', '../base/base.gyp:base', '../skia/skia.gyp:skia', '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', @@ -35,6 +31,4 @@ 'include_dirs': [ '..', ], - }, - ], } |