electron/brightray/brightray.gyp

189 lines
6.8 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.
'linux_system_libraries': 'gtk+-2.0 libnotify dbus-1 x11 xrandr xext gconf-2.0'
},
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',
'<(libchromiumcontent_src_dir)/third_party/skia/include/core',
'<(libchromiumcontent_src_dir)/third_party/WebKit',
'<(libchromiumcontent_dir)/gen',
2013-03-13 19:12:05 +00:00
],
'direct_dependent_settings': {
'include_dirs': [
'.',
'..',
'<(libchromiumcontent_src_dir)',
'<(libchromiumcontent_src_dir)/skia/config',
'<(libchromiumcontent_src_dir)/third_party/skia/include/core',
'<(libchromiumcontent_src_dir)/third_party/icu/source/common',
'<(libchromiumcontent_src_dir)/third_party/WebKit',
'<(libchromiumcontent_dir)/gen',
2013-03-13 19:12:05 +00:00
],
},
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',
],
}
}, {
'link_settings': {
'libraries': [ '<@(libchromiumcontent_libraries)' ]
},
}],
['OS=="linux"', {
'link_settings': {
'ldflags': [
2015-04-09 02:14:25 +00:00
'<!@(pkg-config --libs-only-L --libs-only-other <(linux_system_libraries))',
],
'libraries': [
'-lpthread',
2015-04-09 02:14:25 +00:00
'<!@(pkg-config --libs-only-l <(linux_system_libraries))',
],
},
'cflags': [
2015-04-09 02:14:25 +00:00
'<!@(pkg-config --cflags <(linux_system_libraries))',
# Needed by using libgtk2ui:
'-Wno-deprecated-register',
],
'direct_dependent_settings': {
'cflags': [
2015-04-09 02:14:25 +00:00
'<!@(pkg-config --cflags <(linux_system_libraries))',
'-Wno-deprecated-register',
],
},
'conditions': [
['libchromiumcontent_component', {
'link_settings': {
'libraries': [
# libgtk2ui is always linked statically.
'<(libchromiumcontent_dir)/libgtk2ui.a',
],
},
}, {
'link_settings': {
'libraries': [
# libboringssl is always linked dynamically.
'<(libchromiumcontent_dir)/libboringssl.so',
# Following libraries are required by libchromiumcontent:
'-lasound',
'-lcap',
'-lcups',
'-lrt',
'-ldl',
'-lresolv',
'-lfontconfig',
'-lfreetype',
'-lX11 -lXi -lXcursor -lXext -lXfixes -lXrender -lXcomposite -lXdamage -lXtst -lXrandr',
'-lexpat',
],
},
}],
],
2015-04-08 02:34:58 +00:00
}],
2013-03-13 19:12:05 +00:00
['OS=="mac"', {
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
],
},
}],
['OS=="mac" and libchromiumcontent_component==0', {
'link_settings': {
'libraries': [
# This library is built as shared library to avoid symbols
# conflict with Node.
'<(libchromiumcontent_dir)/libboringssl.dylib',
# 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',
'$(SDKROOT)/usr/lib/libresolv.dylib',
# media.gyp:
'$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
'$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreMIDI.framework',
'$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
'$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
'$(SDKROOT)/System/Library/Frameworks/QTKit.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',
'$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
# content_browser.gypi:
'$(SDKROOT)/usr/lib/libbsm.dylib',
],
},
}],
2015-04-07 03:28:56 +00:00
['OS=="win" and libchromiumcontent_component==1', {
'link_settings': {
'libraries': [
'<(libchromiumcontent_dir)/base_static.lib',
'<(libchromiumcontent_dir)/sandbox.lib',
],
},
2015-04-07 03:28:56 +00:00
}],
['OS=="win" and libchromiumcontent_component==0', {
2015-04-06 07:03:53 +00:00
'link_settings': {
'libraries': [
2015-04-07 12:18:09 +00:00
'<(libchromiumcontent_dir)/boringssl.dll',
2015-04-06 07:03:53 +00:00
'<(libchromiumcontent_dir)/ffmpegsumo.lib',
2015-04-06 07:04:07 +00:00
'<(libchromiumcontent_dir)/libyuv.lib',
# content_browser.gypi:
'-lsensorsapi.lib',
'-lportabledeviceguids.lib',
# content_common.gypi:
'-ld3d9.lib',
'-ldxva2.lib',
'-lstrmiids.lib',
'-lmf.lib',
'-lmfplat.lib',
'-lmfuuid.lib',
# media.gyp:
'-lmfreadwrite.lib',
2015-04-06 07:03:53 +00:00
],
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [
'ffmpegsumo.dll',
# content_common.gypi:
'd3d9.dll',
'dxva2.dll',
'mf.dll',
'mfplat.dll',
2015-04-06 07:03:53 +00:00
],
},
},
},
}],
2013-03-13 19:12:05 +00:00
],
},
],
}