Merge pull request #12882 from nornagon/gn-includes
Fix up #includes to work with both GYP and GN
This commit is contained in:
commit
3090550e53
13 changed files with 28 additions and 26 deletions
|
@ -10,7 +10,7 @@
|
||||||
#include "base/callback.h"
|
#include "base/callback.h"
|
||||||
#include "base/location.h"
|
#include "base/location.h"
|
||||||
#include "base/single_thread_task_runner.h"
|
#include "base/single_thread_task_runner.h"
|
||||||
#include "vendor/node/deps/uv/include/uv.h"
|
#include "uv.h" // NOLINT(build/include)
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "atom/common/api/event_emitter_caller.h"
|
#include "atom/common/api/event_emitter_caller.h"
|
||||||
#include "base/synchronization/lock.h"
|
#include "base/synchronization/lock.h"
|
||||||
#include "content/public/browser/browser_thread.h"
|
#include "content/public/browser/browser_thread.h"
|
||||||
#include "native_mate/native_mate/arguments.h"
|
#include "native_mate/arguments.h"
|
||||||
|
|
||||||
namespace mate {
|
namespace mate {
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include "gin/v8_initializer.h"
|
#include "gin/v8_initializer.h"
|
||||||
|
|
||||||
#include "atom/common/node_includes.h"
|
#include "atom/common/node_includes.h"
|
||||||
#include "vendor/node/src/tracing/trace_event.h"
|
#include "tracing/trace_event.h"
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
#include "base/process/process_metrics.h"
|
#include "base/process/process_metrics.h"
|
||||||
#include "base/strings/string16.h"
|
#include "base/strings/string16.h"
|
||||||
#include "native_mate/arguments.h"
|
#include "native_mate/arguments.h"
|
||||||
|
#include "uv.h" // NOLINT(build/include)
|
||||||
#include "v8/include/v8.h"
|
#include "v8/include/v8.h"
|
||||||
#include "vendor/node/deps/uv/include/uv.h"
|
|
||||||
|
|
||||||
namespace node {
|
namespace node {
|
||||||
class Environment;
|
class Environment;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "atom/common/atom_command_line.h"
|
#include "atom/common/atom_command_line.h"
|
||||||
|
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "node/deps/uv/include/uv.h"
|
#include "uv.h" // NOLINT(build/include)
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
#include "atom/common/crash_reporter/crash_reporter.h"
|
#include "atom/common/crash_reporter/crash_reporter.h"
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
#include "base/strings/string_piece.h"
|
#include "base/strings/string_piece.h"
|
||||||
#include "vendor/crashpad/client/crash_report_database.h"
|
#include "crashpad/client/crash_report_database.h"
|
||||||
#include "vendor/crashpad/client/simple_string_dictionary.h"
|
#include "crashpad/client/simple_string_dictionary.h"
|
||||||
|
|
||||||
namespace base {
|
namespace base {
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "base/strings/sys_string_conversions.h"
|
#include "base/strings/sys_string_conversions.h"
|
||||||
#include "base/threading/thread_restrictions.h"
|
#include "base/threading/thread_restrictions.h"
|
||||||
#include "vendor/crashpad/client/crashpad_client.h"
|
#include "crashpad/client/crashpad_client.h"
|
||||||
#include "vendor/crashpad/client/crashpad_info.h"
|
#include "crashpad/client/crashpad_info.h"
|
||||||
#include "vendor/crashpad/client/settings.h"
|
#include "crashpad/client/settings.h"
|
||||||
|
|
||||||
namespace crash_reporter {
|
namespace crash_reporter {
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
#include "base/macros.h"
|
#include "base/macros.h"
|
||||||
#include "base/memory/weak_ptr.h"
|
#include "base/memory/weak_ptr.h"
|
||||||
#include "base/single_thread_task_runner.h"
|
#include "base/single_thread_task_runner.h"
|
||||||
|
#include "uv.h" // NOLINT(build/include)
|
||||||
#include "v8/include/v8.h"
|
#include "v8/include/v8.h"
|
||||||
#include "vendor/node/deps/uv/include/uv.h"
|
|
||||||
|
|
||||||
namespace base {
|
namespace base {
|
||||||
class MessageLoop;
|
class MessageLoop;
|
||||||
|
|
|
@ -29,13 +29,13 @@
|
||||||
#undef LIKELY
|
#undef LIKELY
|
||||||
#undef arraysize
|
#undef arraysize
|
||||||
#undef debug_string // This is defined in macOS 10.9 SDK in AssertMacros.h.
|
#undef debug_string // This is defined in macOS 10.9 SDK in AssertMacros.h.
|
||||||
#include "vendor/node/src/env-inl.h"
|
#include "env-inl.h"
|
||||||
#include "vendor/node/src/env.h"
|
#include "env.h"
|
||||||
#include "vendor/node/src/node.h"
|
#include "node.h"
|
||||||
#include "vendor/node/src/node_buffer.h"
|
#include "node_buffer.h"
|
||||||
#include "vendor/node/src/node_debug_options.h"
|
#include "node_debug_options.h"
|
||||||
#include "vendor/node/src/node_internals.h"
|
#include "node_internals.h"
|
||||||
#include "vendor/node/src/node_platform.h"
|
#include "node_platform.h"
|
||||||
|
|
||||||
namespace node {
|
namespace node {
|
||||||
namespace tracing {
|
namespace tracing {
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include "atom/common/node_includes.h"
|
#include "atom/common/node_includes.h"
|
||||||
#include "atom_natives.h" // NOLINT: This file is generated with js2c
|
#include "atom_natives.h" // NOLINT: This file is generated with js2c
|
||||||
#include "vendor/node/src/tracing/trace_event.h"
|
#include "tracing/trace_event.h"
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,7 @@
|
||||||
#include "media/base/key_system_properties.h"
|
#include "media/base/key_system_properties.h"
|
||||||
#include "media/media_features.h"
|
#include "media/media_features.h"
|
||||||
|
|
||||||
// #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
|
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
|
||||||
#include "third_party/widevine/cdm/stub/widevine_cdm_version.h"
|
|
||||||
|
|
||||||
// The following must be after widevine_cdm_version.h.
|
// The following must be after widevine_cdm_version.h.
|
||||||
|
|
||||||
|
|
|
@ -304,6 +304,7 @@
|
||||||
'<(libchromiumcontent_src_dir)/third_party/',
|
'<(libchromiumcontent_src_dir)/third_party/',
|
||||||
'<(libchromiumcontent_src_dir)/components/cdm',
|
'<(libchromiumcontent_src_dir)/components/cdm',
|
||||||
'<(libchromiumcontent_src_dir)/third_party/widevine',
|
'<(libchromiumcontent_src_dir)/third_party/widevine',
|
||||||
|
'<(libchromiumcontent_src_dir)/third_party/widevine/cdm/stub',
|
||||||
'<(libchromiumcontent_src_dir)/third_party/protobuf/src',
|
'<(libchromiumcontent_src_dir)/third_party/protobuf/src',
|
||||||
# The 'third_party/webrtc/modules/desktop_capture/desktop_capture_options.h' is using 'rtc_base/constructormagic.h'.
|
# The 'third_party/webrtc/modules/desktop_capture/desktop_capture_options.h' is using 'rtc_base/constructormagic.h'.
|
||||||
'<(libchromiumcontent_src_dir)/third_party/webrtc',
|
'<(libchromiumcontent_src_dir)/third_party/webrtc',
|
||||||
|
@ -584,6 +585,7 @@
|
||||||
'action': [
|
'action': [
|
||||||
'python',
|
'python',
|
||||||
'tools/js2c.py',
|
'tools/js2c.py',
|
||||||
|
'vendor/node',
|
||||||
'<@(_outputs)',
|
'<@(_outputs)',
|
||||||
'<(js2c_input_dir)',
|
'<(js2c_input_dir)',
|
||||||
],
|
],
|
||||||
|
|
|
@ -24,14 +24,15 @@ namespace node {{
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
natives = os.path.abspath(sys.argv[1])
|
node_path = os.path.abspath(sys.argv[1])
|
||||||
js_source_files = glob.glob('{0}/*.js'.format(sys.argv[2]))
|
natives = os.path.abspath(sys.argv[2])
|
||||||
|
js_source_files = glob.glob('{0}/*.js'.format(sys.argv[3]))
|
||||||
|
|
||||||
call_js2c(natives, js_source_files)
|
call_js2c(node_path, natives, js_source_files)
|
||||||
|
|
||||||
|
|
||||||
def call_js2c(natives, js_source_files):
|
def call_js2c(node_path, natives, js_source_files):
|
||||||
js2c = os.path.join(SOURCE_ROOT, 'vendor', 'node', 'tools', 'js2c.py')
|
js2c = os.path.join(node_path, 'tools', 'js2c.py')
|
||||||
src_dir = os.path.dirname(js_source_files[0])
|
src_dir = os.path.dirname(js_source_files[0])
|
||||||
with scoped_cwd(src_dir):
|
with scoped_cwd(src_dir):
|
||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
|
|
Loading…
Reference in a new issue