Index: mojo/mojo.gyp |
diff --git a/mojo/mojo.gyp b/mojo/mojo.gyp |
index b8ae404e9e1add28db6b07528c2c0512149324cf..5ac20475106a008cd0152edeb41f3d177708a7a4 100644 |
--- a/mojo/mojo.gyp |
+++ b/mojo/mojo.gyp |
@@ -16,6 +16,32 @@ |
'variables': { |
'chromium_code': 1, |
'mojo_shell_debug_url%': "", |
+ # We build two versions of these libraries, a version for use in |
+ # Chromium and the shell and an "embedded" version for use in loadable |
+ # apps/services. |
+ 'common_sources': [ |
+ 'common/common_type_converters.cc', |
+ 'common/common_type_converters.h', |
+ 'common/data_pipe_utils.cc', |
+ 'common/data_pipe_utils.h', |
+ 'common/handle_watcher.cc', |
+ 'common/handle_watcher.h', |
+ 'common/message_pump_mojo.cc', |
+ 'common/message_pump_mojo.h', |
+ 'common/message_pump_mojo_handler.h', |
+ 'common/time_helper.cc', |
+ 'common/time_helper.h', |
+ ], |
+ 'environment_chromium_sources': [ |
+ 'environment/default_async_waiter_impl.cc', |
+ 'environment/default_async_waiter_impl.h', |
+ 'environment/default_logger_impl.cc', |
+ 'environment/default_logger_impl.h', |
+ 'environment/environment.cc', |
+ # TODO(vtl): This is kind of ugly. (See TODO in logging.h.) |
+ "public/cpp/environment/logging.h", |
+ "public/cpp/environment/lib/logging.h", |
+ ], |
}, |
'includes': [ |
'mojo_apps.gypi', |
@@ -30,6 +56,7 @@ |
'dependencies': [ |
'mojo_apps_js_unittests', |
'mojo_compositor_app', |
+ 'mojo_common_embedded_lib', |
'mojo_common_lib', |
'mojo_common_unittests', |
'mojo_cpp_bindings', |
@@ -324,7 +351,29 @@ |
], |
}, |
{ |
+ # For use in loadable apps and services. |
+ 'target_name': 'mojo_common_embedded_lib', |
+ 'type': 'static_library', |
+ 'defines': [ |
+ 'MOJO_COMMON_EMBEDDED', |
+ ], |
+ 'dependencies': [ |
+ '..//base/base.gyp:base', |
+ '..//base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', |
+ 'mojo_system', |
+ ], |
+ 'sources': [ |
+ '<@(common_sources)', |
+ ], |
+ 'all_dependent_settings': { |
+ 'defines': [ |
+ 'MOJO_COMMON_EMBEDDED', |
+ ], |
+ }, |
+ }, |
+ { |
# GN version: //mojo/common |
+ # For use in Chromium and the shell. |
'target_name': 'mojo_common_lib', |
'type': '<(component)', |
'defines': [ |
@@ -336,21 +385,12 @@ |
'mojo_system_impl', |
], |
'export_dependent_settings': [ |
+ '../base/base.gyp:base', |
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', |
'mojo_system_impl', |
], |
'sources': [ |
- 'common/common_type_converters.cc', |
- 'common/common_type_converters.h', |
- 'common/data_pipe_utils.cc', |
- 'common/data_pipe_utils.h', |
- 'common/handle_watcher.cc', |
- 'common/handle_watcher.h', |
- 'common/message_pump_mojo.cc', |
- 'common/message_pump_mojo.h', |
- 'common/message_pump_mojo_handler.h', |
- 'common/time_helper.cc', |
- 'common/time_helper.h', |
+ '<@(common_sources)', |
], |
}, |
{ |
@@ -392,46 +432,40 @@ |
], |
}, |
{ |
- # GN version: //mojo/environment:chromium |
- 'target_name': 'mojo_environment_chromium', |
+ # For use in loadable apps and services. |
+ 'target_name': 'mojo_environment_chromium_embedded', |
'type': 'static_library', |
'dependencies': [ |
- 'mojo_common_lib', |
- 'mojo_environment_chromium_impl', |
- ], |
- 'sources': [ |
- 'environment/environment.cc', |
- # TODO(vtl): This is kind of ugly. (See TODO in logging.h.) |
- "public/cpp/environment/logging.h", |
- "public/cpp/environment/lib/logging.h", |
- ], |
- 'include_dirs': [ |
- '..', |
+ '../base/base.gyp:base', |
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', |
+ 'mojo_common_embedded_lib', |
+ 'mojo_system', |
], |
'export_dependent_settings': [ |
- 'mojo_environment_chromium_impl', |
+ '../base/base.gyp:base', |
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', |
+ ], |
+ 'sources': [ |
+ '<@(environment_chromium_sources)', |
], |
}, |
{ |
- # GN version: //mojo/environment:chromium_impl |
- 'target_name': 'mojo_environment_chromium_impl', |
- 'type': '<(component)', |
- 'defines': [ |
- 'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION', |
- ], |
+ # GN version: //mojo/environment:chromium |
+ # For use in Chromium and the shell. |
+ 'target_name': 'mojo_environment_chromium', |
+ 'type': 'static_library', |
'dependencies': [ |
'../base/base.gyp:base', |
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', |
- 'mojo_common_lib' |
+ 'mojo_common_lib', |
+ 'mojo_system_impl', |
], |
- 'sources': [ |
- 'environment/default_async_waiter_impl.cc', |
- 'environment/default_async_waiter_impl.h', |
- 'environment/default_logger_impl.cc', |
- 'environment/default_logger_impl.h', |
+ 'export_dependent_settings': [ |
+ '../base/base.gyp:base', |
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', |
], |
- 'include_dirs': [ |
- '..', |
+ 'sources': [ |
+ '<@(environment_chromium_sources)', |
], |
}, |
{ |
@@ -572,6 +606,7 @@ |
'../base/base.gyp:base', |
'../base/base.gyp:base_static', |
'../url/url.gyp:url_lib', |
+ 'mojo_common_lib', |
'mojo_service_manager', |
'mojo_shell_lib', |
'mojo_system_impl', |