Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Add support for shared_library and static_library build of libchromiumcontent #97

Merged
merged 45 commits into from Apr 11, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
de08e65
Upgrade libchromiumcontent for component build
zcbenz Apr 2, 2015
a430d8f
Link with component build shared libraries
zcbenz Apr 2, 2015
7791215
Only do component build in Debug mode
zcbenz Apr 2, 2015
09c73a0
Set libraries' path according to libchromiumcontent_component variable
zcbenz Apr 2, 2015
2c0b5dc
mac: Link with all necessary system libraries
zcbenz Apr 3, 2015
ca99356
Link with libboringssl.dylib
zcbenz Apr 3, 2015
f89e3f6
Use "D" and "R" as short names
zcbenz Apr 3, 2015
5c11413
Download static_library build of libchromiumcontent
zcbenz Apr 5, 2015
3199b1b
win: Fix libchromiumcontent_src_dir not defined
zcbenz Apr 5, 2015
7b4c9c3
win: Add configurations for x64 build
zcbenz Apr 5, 2015
0890dc3
win: Link with sandbox and base_static under component build
zcbenz Apr 6, 2015
cd70f45
win: Fix defines under component build
zcbenz Apr 6, 2015
5256413
win: Fix linking with ffmepg
zcbenz Apr 6, 2015
7feb0f9
win: Fix linking with libyuv
zcbenz Apr 6, 2015
cbd55d9
win: Link with boringssl.dll
zcbenz Apr 6, 2015
f58bc1b
win: Import system libraries in content_common.gypi
zcbenz Apr 6, 2015
a09b6c7
win: Link with libraries from other places
zcbenz Apr 6, 2015
f2269aa
Fix generating configs on OS X and Linux
zcbenz Apr 6, 2015
d4c8ac2
mac: Fix linking with boringssl
zcbenz Apr 7, 2015
71a4624
win: Link with DLL version of vcrt in component build
zcbenz Apr 7, 2015
ae360b9
Still link with shared_library of boringssl
zcbenz Apr 7, 2015
616ce90
Fix path to boringssl.dll
zcbenz Apr 7, 2015
e1304ed
Don't call download twice
zcbenz Apr 7, 2015
a44b1be
linux: Link with libboringssl.so
zcbenz Apr 8, 2015
a48d720
Link with static_library version of libgtk2ui
zcbenz Apr 8, 2015
bff2151
linux: Fix linking with system libraries
zcbenz Apr 8, 2015
dfce146
Remove linux_clang option
zcbenz Apr 8, 2015
821eed6
linux: Improve building flags for Release build
zcbenz Apr 9, 2015
3f43880
Move filename rules to another file
zcbenz Apr 9, 2015
1dfc7e5
Move filenames to another file
zcbenz Apr 9, 2015
80c8211
Add "linux_system_libraries" variable
zcbenz Apr 9, 2015
4a31d15
mac: Improve configs for Release build
zcbenz Apr 9, 2015
bf71f9c
Add flag to build with clang
zcbenz Apr 9, 2015
c735889
mac: "xcode_settings" doesn't work under "configurations"
zcbenz Apr 9, 2015
6832cc4
linux: Work around linker OOM on 32bit target
zcbenz Apr 9, 2015
3f5f764
win: Remove unused config variables
zcbenz Apr 9, 2015
1d51c90
win: No need to set default linked libraries
zcbenz Apr 9, 2015
ed724c2
win: Cleanup the compiler settings
zcbenz Apr 9, 2015
21ab1ef
win: Do not use link time code generation
zcbenz Apr 9, 2015
1b62aab
Separate V8 libraries from other libraries
zcbenz Apr 9, 2015
0f37e5f
Fix including icu libraries
zcbenz Apr 10, 2015
14b4dc7
No longer link with shared library of boringssl
zcbenz Apr 10, 2015
9b4018b
Debug_Base and Release_Base configs are abstract
zcbenz Apr 11, 2015
f2b33da
Cleanup the brightray.gyp file
zcbenz Apr 11, 2015
0efd9f7
Set libchromiumcontent_component when bootstrapping
zcbenz Apr 11, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
269 changes: 168 additions & 101 deletions brightray.gyp
@@ -1,136 +1,203 @@
{
'includes': [
'brightray.gypi',
],
'variables': {
'brightray_source_root': '<!(["python", "tools/brightray_source_root.py"])',
# The libraries brightray will be compiled to.
'linux_system_libraries': 'gtk+-2.0 libnotify dbus-1 x11 xrandr xext gconf-2.0'
},
'includes': [
'filenames.gypi',
],
'targets': [
{
'target_name': 'brightray',
'type': 'static_library',
'include_dirs': [
'.',
'<(libchromiumcontent_include_dir)',
'<(libchromiumcontent_include_dir)/skia/config',
'<(libchromiumcontent_include_dir)/third_party/skia/include/core',
'<(libchromiumcontent_include_dir)/third_party/WebKit',
'<(libchromiumcontent_library_dir)/gen',
'<(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',
],
'direct_dependent_settings': {
'include_dirs': [
'.',
'..',
'<(libchromiumcontent_include_dir)',
'<(libchromiumcontent_include_dir)/skia/config',
'<(libchromiumcontent_include_dir)/third_party/skia/include/core',
'<(libchromiumcontent_include_dir)/third_party/icu/source/common',
'<(libchromiumcontent_include_dir)/third_party/WebKit',
'<(libchromiumcontent_library_dir)/gen',
'<(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',
],
},
'sources': [
'browser/brightray_paths.h',
'browser/browser_client.cc',
'browser/browser_client.h',
'browser/browser_context.cc',
'browser/browser_context.h',
'browser/browser_main_parts.cc',
'browser/browser_main_parts.h',
'browser/browser_main_parts_mac.mm',
'browser/default_web_contents_delegate.cc',
'browser/default_web_contents_delegate.h',
'browser/default_web_contents_delegate_mac.mm',
'browser/devtools_contents_resizing_strategy.cc',
'browser/devtools_contents_resizing_strategy.h',
'browser/devtools_embedder_message_dispatcher.cc',
'browser/devtools_embedder_message_dispatcher.h',
'browser/devtools_manager_delegate.cc',
'browser/devtools_manager_delegate.h',
'browser/devtools_ui.cc',
'browser/devtools_ui.h',
'browser/inspectable_web_contents.cc',
'browser/inspectable_web_contents.h',
'browser/inspectable_web_contents_delegate.cc',
'browser/inspectable_web_contents_delegate.h',
'browser/inspectable_web_contents_impl.cc',
'browser/inspectable_web_contents_impl.h',
'browser/inspectable_web_contents_view.h',
'browser/inspectable_web_contents_view_mac.h',
'browser/inspectable_web_contents_view_mac.mm',
'browser/mac/bry_application.h',
'browser/mac/bry_application.mm',
'browser/mac/bry_inspectable_web_contents_view.h',
'browser/mac/bry_inspectable_web_contents_view.mm',
'browser/media/media_capture_devices_dispatcher.cc',
'browser/media/media_capture_devices_dispatcher.h',
'browser/media/media_stream_devices_controller.cc',
'browser/media/media_stream_devices_controller.h',
'browser/network_delegate.cc',
'browser/network_delegate.h',
'browser/notification_presenter.h',
'browser/notification_presenter_mac.h',
'browser/notification_presenter_mac.mm',
'browser/platform_notification_service_impl.cc',
'browser/platform_notification_service_impl.h',
'browser/linux/notification_presenter_linux.h',
'browser/linux/notification_presenter_linux.cc',
'browser/url_request_context_getter.cc',
'browser/url_request_context_getter.h',
'browser/views/inspectable_web_contents_view_views.h',
'browser/views/inspectable_web_contents_view_views.cc',
'browser/views/views_delegate.cc',
'browser/views/views_delegate.h',
'browser/web_ui_controller_factory.cc',
'browser/web_ui_controller_factory.h',
'common/application_info.h',
'common/application_info_mac.mm',
'common/application_info_win.cc',
'common/content_client.cc',
'common/content_client.h',
'common/mac/foundation_util.h',
'common/mac/main_application_bundle.h',
'common/mac/main_application_bundle.mm',
'common/main_delegate.cc',
'common/main_delegate.h',
'common/main_delegate_mac.mm',
],
'sources': [ '<@(brightray_sources)' ],
'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',
],
}
}, { # (Release build on Linux)
'link_settings': {
'libraries': [ '<@(libchromiumcontent_libraries)' ]
},
}], # (Normal builds)
# Linux specific link settings.
['OS=="linux"', {
'cflags_cc': [
'-Wno-deprecated-register',
'-fno-rtti',
],
'link_settings': {
'ldflags': [
'<!@(pkg-config --libs-only-L --libs-only-other gtk+-2.0 libnotify dbus-1 x11 xrandr xext gconf-2.0)',
'<!@(pkg-config --libs-only-L --libs-only-other <(linux_system_libraries))',
],
'libraries': [
'<(brightray_source_root)/<(libchromiumcontent_library_dir)/libchromiumcontent.so',
'<(brightray_source_root)/<(libchromiumcontent_library_dir)/libchromiumviews.a',
'-lpthread',
'<!@(pkg-config --libs-only-l gtk+-2.0 libnotify dbus-1 x11 xrandr xext gconf-2.0)',
'<!@(pkg-config --libs-only-l <(linux_system_libraries))',
],
},
}],
'cflags': [
'<!@(pkg-config --cflags <(linux_system_libraries))',
# Needed by using libgtk2ui:
'-Wno-deprecated-register',
],
'direct_dependent_settings': {
'cflags': [
'<!@(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': [
# 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',
],
},
}],
],
}], # OS=="linux"
['OS=="mac"', {
'link_settings': {
'libraries': [
'<(brightray_source_root)/<(libchromiumcontent_library_dir)/libchromiumcontent.dylib',
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
],
},
}],
'conditions': [
# Link with system frameworks.
['libchromiumcontent_component==0', {
'link_settings': {
'libraries': [
# 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',
],
},
}],
]
}], # OS=="mac"
['OS=="win"', {
'link_settings': {
'libraries': [
'<(brightray_source_root)/<(libchromiumcontent_library_dir)/base_static.lib',
'<(brightray_source_root)/<(libchromiumcontent_library_dir)/chromiumcontent.dll.lib',
'<(brightray_source_root)/<(libchromiumcontent_library_dir)/chromiumviews.lib',
'<(brightray_source_root)/<(libchromiumcontent_library_dir)/sandbox_static.lib',
],
},
}],
'conditions': [
['libchromiumcontent_component', {
# sandbox and base_static are always linked statically.
'link_settings': {
'libraries': [
'<(libchromiumcontent_dir)/base_static.lib',
'<(libchromiumcontent_dir)/sandbox.lib',
],
},
}, {
# Link with system libraries.
'link_settings': {
'libraries': [
# ffmpegsumo.lib is required for linking with ffmpegsumo.dll
'<(libchromiumcontent_dir)/ffmpegsumo.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',
],
'msvs_settings': {
'VCLinkerTool': {
'AdditionalDependencies': [
'advapi32.lib',
'dbghelp.lib',
'dwmapi.lib',
'gdi32.lib',
'netapi32.lib',
'oleacc.lib',
'powrprof.lib',
'user32.lib',
'usp10.lib',
'version.lib',
'winspool.lib',
],
'DelayLoadDLLs': [
'ffmpegsumo.dll',
# content_common.gypi:
'd3d9.dll',
'dxva2.dll',
'mf.dll',
'mfplat.dll',
],
},
},
},
}], # libchromiumcontent_component
],
}], # OS=="win"
],
},
],
Expand Down