electron/brightray/brightray.gyp

453 lines
20 KiB
Text
Raw Normal View History

2013-03-13 19:12:05 +00:00
{
2015-04-09 02:14:25 +00:00
'variables': {
# The libraries brightray will be compiled to.
2017-09-27 14:20:22 +00:00
'linux_system_libraries': 'gtk+-3.0 dbus-1 x11 x11-xcb xcb xi xcursor xdamage xrandr xcomposite xext xfixes xrender xtst xscrnsaver gconf-2.0 gmodule-2.0 nss',
'conditions': [
['target_arch=="mips64el"', {
'linux_system_libraries': '<(linux_system_libraries) libpulse',
}],
],
2015-04-09 02:14:25 +00:00
},
2013-03-13 19:12:05 +00:00
'includes': [
2015-04-09 02:11:28 +00:00
'filenames.gypi',
2013-03-13 19:12:05 +00:00
],
'targets': [
{
'target_name': 'brightray',
'type': 'static_library',
'include_dirs': [
'..',
'<(libchromiumcontent_src_dir)',
'<(libchromiumcontent_src_dir)/skia/config',
2017-01-23 06:13:28 +00:00
'<(libchromiumcontent_src_dir)/third_party/boringssl/src/include',
'<(libchromiumcontent_src_dir)/third_party/skia/include/core',
2017-11-23 10:44:32 +00:00
'<(libchromiumcontent_src_dir)/third_party/skia/include/gpu',
2015-04-21 06:30:06 +00:00
'<(libchromiumcontent_src_dir)/third_party/mojo/src',
'<(libchromiumcontent_src_dir)/third_party/WebKit',
2017-11-23 10:01:51 +00:00
'<(libchromiumcontent_src_dir)/third_party/khronos',
'<(libchromiumcontent_src_dir)/third_party/protobuf/src',
'<(libchromiumcontent_dir)/gen',
2013-03-13 19:12:05 +00:00
],
'direct_dependent_settings': {
'include_dirs': [
'../vendor',
'<(libchromiumcontent_src_dir)',
'<(libchromiumcontent_src_dir)/gpu',
'<(libchromiumcontent_src_dir)/skia/config',
'<(libchromiumcontent_src_dir)/third_party/boringssl/src/include',
'<(libchromiumcontent_src_dir)/third_party/skia/include/core',
2017-11-23 10:44:32 +00:00
'<(libchromiumcontent_src_dir)/third_party/skia/include/gpu',
'<(libchromiumcontent_src_dir)/third_party/skia/include/config',
'<(libchromiumcontent_src_dir)/third_party/icu/source/common',
2015-04-21 06:30:06 +00:00
'<(libchromiumcontent_src_dir)/third_party/mojo/src',
2016-07-28 00:11:57 +00:00
'<(libchromiumcontent_src_dir)/third_party/khronos',
'<(libchromiumcontent_src_dir)/third_party/WebKit',
'<(libchromiumcontent_dir)/gen',
'<(libchromiumcontent_dir)/gen/third_party/WebKit',
2013-03-13 19:12:05 +00:00
],
},
'defines': [
# See Chromium's "src/third_party/protobuf/BUILD.gn".
'GOOGLE_PROTOBUF_NO_RTTI',
'GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER',
],
2015-04-09 02:11:28 +00:00
'sources': [ '<@(brightray_sources)' ],
2013-03-13 19:12:05 +00:00
'conditions': [
# Link with libraries of libchromiumcontent.
['OS=="linux" and libchromiumcontent_component==0', {
# On Linux we have to use "--whole-archive" to force executable
# to include all symbols, otherwise we will have plenty of
# unresolved symbols errors.
'direct_dependent_settings': {
'ldflags': [
'-Wl,--whole-archive',
'<@(libchromiumcontent_libraries)',
'-Wl,--no-whole-archive',
],
}
2015-04-11 05:26:29 +00:00
}, { # (Release build on Linux)
'link_settings': {
'libraries': [ '<@(libchromiumcontent_libraries)' ]
},
2015-04-11 05:26:29 +00:00
}], # (Normal builds)
# Linux specific link settings.
['OS=="linux"', {
'link_settings': {
'ldflags': [
2016-03-09 14:13:33 +00:00
'<!@(<(pkg-config) --libs-only-L --libs-only-other <(linux_system_libraries))',
],
'libraries': [
'-lpthread',
2018-01-30 01:26:08 +00:00
'-latomic',
2016-03-09 14:13:33 +00:00
'<!@(<(pkg-config) --libs-only-l <(linux_system_libraries))',
],
},
'cflags': [
2016-03-09 14:13:33 +00:00
'<!@(<(pkg-config) --cflags <(linux_system_libraries))',
2015-04-22 05:50:27 +00:00
],
'direct_dependent_settings': {
'cflags': [
2016-03-09 14:13:33 +00:00
'<!@(<(pkg-config) --cflags <(linux_system_libraries))',
],
},
'conditions': [
2017-11-21 12:48:06 +00:00
['clang==1', {
'cflags_cc': [
'-Wno-reserved-user-defined-literal',
],
'cflags': [
# Needed by using libgtkui:
'-Wno-deprecated-register',
'-Wno-sentinel',
],
'direct_dependent_settings': {
'cflags': [
'-Wno-deprecated-register',
'-Wno-sentinel',
],
},
}],
['libchromiumcontent_component', {
'link_settings': {
'libraries': [
# Following libraries are always linked statically.
2017-01-26 10:54:24 +00:00
'<(libchromiumcontent_dir)/libgtkui.a',
'<(libchromiumcontent_dir)/libhttp_server.a',
'<(libchromiumcontent_dir)/libdesktop_capture.a',
'<(libchromiumcontent_dir)/libdom_keycode_converter.a',
'<(libchromiumcontent_dir)/libsystem_wrappers.a',
'<(libchromiumcontent_dir)/librtc_base.a',
2017-12-19 00:56:21 +00:00
'<(libchromiumcontent_dir)/librtc_base_generic.a',
'<(libchromiumcontent_dir)/libwebrtc_common.a',
'<(libchromiumcontent_dir)/libinit_webrtc.a',
'<(libchromiumcontent_dir)/libyuv.a',
'<(libchromiumcontent_dir)/librenderer.a',
'<(libchromiumcontent_dir)/libsecurity_state.a',
# components/network_session_configurator/common/
'<(libchromiumcontent_dir)/libcommon.a',
# services/device/wake_lock/power_save_blocker/
'<(libchromiumcontent_dir)/libpower_save_blocker.a',
2017-01-18 07:32:16 +00:00
# Friends of libpdf.a:
2017-02-01 14:55:33 +00:00
# On Linux we have to use "--whole-archive" to include
# all symbols, otherwise there will be plenty of
# unresolved symbols errors.
'-Wl,--whole-archive',
2017-01-18 07:32:16 +00:00
'<(libchromiumcontent_dir)/libpdf.a',
'<(libchromiumcontent_dir)/libppapi_cpp_objects.a',
'<(libchromiumcontent_dir)/libppapi_internal_module.a',
'<(libchromiumcontent_dir)/libpdfium.a',
'<(libchromiumcontent_dir)/libfdrm.a',
'<(libchromiumcontent_dir)/libformfiller.a',
'<(libchromiumcontent_dir)/libfpdfapi.a',
'<(libchromiumcontent_dir)/libfpdfdoc.a',
'<(libchromiumcontent_dir)/libfpdftext.a',
'<(libchromiumcontent_dir)/libfxcodec.a',
'<(libchromiumcontent_dir)/libfxge.a',
'<(libchromiumcontent_dir)/libfxjs.a',
'<(libchromiumcontent_dir)/libjavascript.a',
'<(libchromiumcontent_dir)/libpwl.a',
2017-01-18 07:32:16 +00:00
'<(libchromiumcontent_dir)/libfx_agg.a',
'<(libchromiumcontent_dir)/libfx_lcms2.a',
'<(libchromiumcontent_dir)/libfx_libopenjpeg.a',
'<(libchromiumcontent_dir)/libfx_zlib.a',
'-Wl,--no-whole-archive',
],
},
}, {
'link_settings': {
'libraries': [
2016-02-17 14:20:40 +00:00
# Link with ffmpeg.
'<(libchromiumcontent_dir)/libffmpeg.so',
# Following libraries are required by libchromiumcontent:
'-lasound',
'-lcap',
'-lcups',
'-lrt',
'-ldl',
'-lresolv',
'-lfontconfig',
'-lexpat',
],
},
}],
2018-05-18 01:47:29 +00:00
# This lib does not exist on arm.
['target_arch=="arm"', {
'link_settings': {
'libraries!': [
'<(libchromiumcontent_dir)/libdesktop_capture_differ_sse2.a',
],
},
}],
2018-05-18 01:47:29 +00:00
# Due to strange linker behavior, component build of arm needs to
# be linked with libjpeg.a explicitly.
['target_arch=="arm" and libchromiumcontent_component==1', {
'link_settings': {
'libraries': [
'<(libchromiumcontent_dir)/libjpeg.a',
],
},
}],
],
2015-04-11 05:26:29 +00:00
}], # OS=="linux"
2013-03-13 19:12:05 +00:00
['OS=="mac"', {
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
2015-12-08 08:52:38 +00:00
# Required by webrtc:
'$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
2015-12-08 08:52:38 +00:00
'$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
2017-04-18 07:05:57 +00:00
# Required by media:
'$(SDKROOT)/System/Library/Frameworks/VideoToolbox.framework',
2013-03-13 19:12:05 +00:00
],
},
2015-04-11 05:26:29 +00:00
'conditions': [
['libchromiumcontent_component', {
'link_settings': {
'libraries': [
# Following libraries are always linked statically.
'<(libchromiumcontent_dir)/libhttp_server.a',
'<(libchromiumcontent_dir)/libdesktop_capture.a',
'<(libchromiumcontent_dir)/libdom_keycode_converter.a',
'<(libchromiumcontent_dir)/librtc_base.a',
2017-12-19 00:56:21 +00:00
'<(libchromiumcontent_dir)/librtc_base_generic.a',
'<(libchromiumcontent_dir)/libsystem_wrappers.a',
'<(libchromiumcontent_dir)/libwebrtc_common.a',
'<(libchromiumcontent_dir)/libinit_webrtc.a',
'<(libchromiumcontent_dir)/libyuv.a',
'<(libchromiumcontent_dir)/librenderer.a',
'<(libchromiumcontent_dir)/libsecurity_state.a',
# components/network_session_configurator/common/
'<(libchromiumcontent_dir)/libcommon.a',
# services/device/wake_lock/power_save_blocker/
'<(libchromiumcontent_dir)/libpower_save_blocker.a',
2017-01-18 07:32:16 +00:00
# Friends of libpdf.a:
'<(libchromiumcontent_dir)/libpdf.a',
'<(libchromiumcontent_dir)/libppapi_cpp_objects.a',
'<(libchromiumcontent_dir)/libppapi_internal_module.a',
'<(libchromiumcontent_dir)/libjpeg.a',
2017-01-18 07:32:16 +00:00
'<(libchromiumcontent_dir)/libpdfium.a',
'<(libchromiumcontent_dir)/libfdrm.a',
'<(libchromiumcontent_dir)/libformfiller.a',
'<(libchromiumcontent_dir)/libfpdfapi.a',
'<(libchromiumcontent_dir)/libfpdfdoc.a',
'<(libchromiumcontent_dir)/libfpdftext.a',
'<(libchromiumcontent_dir)/libfxcodec.a',
'<(libchromiumcontent_dir)/libfxcrt.a',
'<(libchromiumcontent_dir)/libfxge.a',
'<(libchromiumcontent_dir)/libfxjs.a',
'<(libchromiumcontent_dir)/libjavascript.a',
'<(libchromiumcontent_dir)/libpwl.a',
2017-01-18 07:32:16 +00:00
'<(libchromiumcontent_dir)/libfx_agg.a',
'<(libchromiumcontent_dir)/libfx_lcms2.a',
'<(libchromiumcontent_dir)/libfx_libopenjpeg.a',
'<(libchromiumcontent_dir)/libfx_zlib.a',
],
},
}, {
2015-04-11 05:26:29 +00:00
'link_settings': {
'libraries': [
2016-02-17 14:20:40 +00:00
# Link with ffmpeg.
'<(libchromiumcontent_dir)/libffmpeg.dylib',
# Link with system frameworks.
2015-04-11 05:26:29 +00:00
# ui_base.gypi:
'$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
# net.gypi:
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
'$(SDKROOT)/System/Library/Frameworks/Security.framework',
'$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
'-lresolv',
2015-04-11 05:26:29 +00:00
# media.gyp:
'$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
'$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
2016-05-23 13:05:08 +00:00
'$(SDKROOT)/System/Library/Frameworks/AVFoundation.framework',
2015-04-11 05:26:29 +00:00
'$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
2016-05-23 13:05:08 +00:00
'$(SDKROOT)/System/Library/Frameworks/CoreMedia.framework',
2015-04-11 05:26:29 +00:00
'$(SDKROOT)/System/Library/Frameworks/CoreMIDI.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
# surface.gyp:
'$(SDKROOT)/System/Library/Frameworks/IOSurface.framework',
# content_common.gypi:
'$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
# base.gyp:
'$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
'$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
# device/gamepad/BUILD.gn:
'$(SDKROOT)/System/Library/Frameworks/GameController.framework',
2015-04-11 05:26:29 +00:00
# content_browser.gypi:
'-lbsm',
2015-12-07 14:44:15 +00:00
# content_common.gypi:
'-lsandbox',
2015-04-21 11:05:39 +00:00
# bluetooth.gyp:
'$(SDKROOT)/System/Library/Frameworks/IOBluetooth.framework',
2017-01-24 12:12:26 +00:00
# components/wifi/BUILD.gn:
'$(SDKROOT)/System/Library/Frameworks/CoreWLAN.framework',
2017-05-24 16:43:37 +00:00
# printing/BUILD.gn:
'-lcups',
],
2015-04-11 05:26:29 +00:00
},
}],
]
}], # OS=="mac"
['OS=="win"', {
'link_settings': {
'msvs_settings': {
'VCLinkerTool': {
'AdditionalOptions': [
# warning /DELAYLOAD:dll ignored; no imports found from dll
'/ignore:4199',
],
'AdditionalDependencies': [
'delayimp.lib',
],
'DelayLoadDLLs': [
'wtsapi32.dll',
# content_common.gypi:
'd3d9.dll',
'd3d11.dll',
'dxva2.dll',
# media.gyp:
'mf.dll',
'mfplat.dll',
'mfreadwrite.dll',
# bluetooth.gyp:
'BluetoothApis.dll',
'Bthprops.cpl',
'setupapi.dll',
# base.gyp:
'cfgmgr32.dll',
'powrprof.dll',
'setupapi.dll',
# net_common.gypi:
'crypt32.dll',
'dhcpcsvc.dll',
'rpcrt4.dll',
'secur32.dll',
'urlmon.dll',
'winhttp.dll',
# windows runtime
'API-MS-WIN-CORE-WINRT-L1-1-0.DLL',
'API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL',
],
},
},
},
2015-04-11 05:26:29 +00:00
'conditions': [
['libchromiumcontent_component', {
'link_settings': {
'libraries': [
2016-09-06 10:54:49 +00:00
# Needed by desktop_capture.lib:
'-ld3d11.lib',
'-ldxgi.lib',
2016-09-06 10:54:49 +00:00
# Following libs are always linked statically.
2015-04-11 05:26:29 +00:00
'<(libchromiumcontent_dir)/base_static.lib',
'<(libchromiumcontent_dir)/sandbox.lib',
2016-03-10 07:11:38 +00:00
'<(libchromiumcontent_dir)/sandbox_helper_win.lib',
2015-08-04 08:02:44 +00:00
'<(libchromiumcontent_dir)/http_server.lib',
'<(libchromiumcontent_dir)/desktop_capture.lib',
'<(libchromiumcontent_dir)/dom_keycode_converter.lib',
'<(libchromiumcontent_dir)/rtc_base.lib',
2018-01-10 12:47:14 +00:00
'<(libchromiumcontent_dir)/rtc_base_generic.lib',
'<(libchromiumcontent_dir)/system_wrappers.lib',
'<(libchromiumcontent_dir)/webrtc_common.lib',
'<(libchromiumcontent_dir)/init_webrtc.lib',
'<(libchromiumcontent_dir)/libyuv.lib',
'<(libchromiumcontent_dir)/renderer.lib',
'<(libchromiumcontent_dir)/security_state.lib',
# components/network_session_configurator/common/
'<(libchromiumcontent_dir)/common.lib',
# services/device/wake_lock/power_save_blocker/
'<(libchromiumcontent_dir)/power_save_blocker.lib',
# Friends of pdf.lib:
'<(libchromiumcontent_dir)/pdf.lib',
'<(libchromiumcontent_dir)/ppapi_cpp_objects.lib',
'<(libchromiumcontent_dir)/ppapi_internal_module.lib',
'<(libchromiumcontent_dir)/libjpeg.lib',
'<(libchromiumcontent_dir)/pdfium.lib',
'<(libchromiumcontent_dir)/fdrm.lib',
'<(libchromiumcontent_dir)/formfiller.lib',
'<(libchromiumcontent_dir)/fpdfapi.lib',
'<(libchromiumcontent_dir)/fpdfdoc.lib',
'<(libchromiumcontent_dir)/fpdftext.lib',
'<(libchromiumcontent_dir)/fpdftext.lib',
'<(libchromiumcontent_dir)/fxcodec.lib',
'<(libchromiumcontent_dir)/fxcrt.lib',
'<(libchromiumcontent_dir)/fxge.lib',
'<(libchromiumcontent_dir)/fxjs.lib',
'<(libchromiumcontent_dir)/javascript.lib',
'<(libchromiumcontent_dir)/pwl.lib',
'<(libchromiumcontent_dir)/fx_agg.lib',
'<(libchromiumcontent_dir)/fx_lcms2.lib',
'<(libchromiumcontent_dir)/fx_libopenjpeg.lib',
'<(libchromiumcontent_dir)/fx_zlib.lib',
2015-04-11 05:26:29 +00:00
],
},
}, {
# Link with system libraries.
'link_settings': {
'libraries': [
2016-02-17 14:20:40 +00:00
# Link with ffmpeg.
'<(libchromiumcontent_dir)/ffmpeg.dll',
2015-04-11 05:26:29 +00:00
# content_browser.gypi:
'-lsensorsapi.lib',
'-lportabledeviceguids.lib',
# content_common.gypi:
2015-04-11 05:26:29 +00:00
'-ld3d9.lib',
2015-05-23 03:25:37 +00:00
'-ld3d11.lib',
'-ldxgi.lib',
2015-04-11 05:26:29 +00:00
'-ldxva2.lib',
'-lstrmiids.lib',
'-lmf.lib',
'-lmfplat.lib',
'-lmfuuid.lib',
# media.gyp:
2016-05-23 14:24:16 +00:00
'-ldxguid.lib',
2015-04-11 05:26:29 +00:00
'-lmfreadwrite.lib',
2016-05-23 14:24:16 +00:00
'-lmfuuid.lib',
2015-04-06 07:03:53 +00:00
],
2015-04-11 05:26:29 +00:00
'msvs_settings': {
'VCLinkerTool': {
'AdditionalDependencies': [
'advapi32.lib',
'dbghelp.lib',
'dwmapi.lib',
'gdi32.lib',
2018-03-14 07:04:19 +00:00
'hid.lib',
2015-04-11 05:26:29 +00:00
'netapi32.lib',
'oleacc.lib',
'user32.lib',
'usp10.lib',
'version.lib',
'winspool.lib',
2016-05-23 13:53:19 +00:00
'wtsapi32.lib',
# bluetooth.gyp:
'Bthprops.lib',
'BluetoothApis.lib',
2016-03-13 01:10:56 +00:00
# base.gyp:
2016-05-23 13:53:19 +00:00
'cfgmgr32.lib',
2016-03-13 01:10:56 +00:00
'powrprof.lib',
2016-05-23 13:53:19 +00:00
'setupapi.lib',
# net_common.gypi:
'crypt32.lib',
'dhcpcsvc.lib',
2017-01-27 08:09:22 +00:00
'ncrypt.lib',
2016-05-23 13:53:19 +00:00
'rpcrt4.lib',
'secur32.lib',
'urlmon.lib',
'winhttp.lib',
# ui/gfx/BUILD.gn:
'dwrite.lib',
2017-01-27 08:11:33 +00:00
# skia/BUILD.gn:
'fontsub.lib',
2015-04-11 05:26:29 +00:00
],
},
},
2015-04-06 07:03:53 +00:00
},
2015-04-11 05:26:29 +00:00
}], # libchromiumcontent_component
],
}], # OS=="win"
2013-03-13 19:12:05 +00:00
],
},
],
}