Link with component build shared libraries
This commit is contained in:
parent
19198a579a
commit
7e41b9e44d
5 changed files with 39 additions and 46 deletions
|
@ -2,9 +2,6 @@
|
|||
'includes': [
|
||||
'brightray.gypi',
|
||||
],
|
||||
'variables': {
|
||||
'brightray_source_root': '<!(["python", "tools/brightray_source_root.py"])',
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'brightray',
|
||||
|
@ -106,8 +103,8 @@
|
|||
'<!@(pkg-config --libs-only-L --libs-only-other gtk+-2.0 libnotify dbus-1 x11 xrandr xext gconf-2.0)',
|
||||
],
|
||||
'libraries': [
|
||||
'<(brightray_source_root)/<(libchromiumcontent_library_dir)/libchromiumcontent.so',
|
||||
'<(brightray_source_root)/<(libchromiumcontent_library_dir)/libchromiumviews.a',
|
||||
'<@(libchromiumcontent_shared_libraries)',
|
||||
'<(libchromiumcontent_library_dir)/libchromiumviews.a',
|
||||
'-lpthread',
|
||||
'<!@(pkg-config --libs-only-l gtk+-2.0 libnotify dbus-1 x11 xrandr xext gconf-2.0)',
|
||||
],
|
||||
|
@ -116,7 +113,7 @@
|
|||
['OS=="mac"', {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'<(brightray_source_root)/<(libchromiumcontent_library_dir)/libchromiumcontent.dylib',
|
||||
'<@(libchromiumcontent_shared_libraries)',
|
||||
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
|
||||
],
|
||||
},
|
||||
|
@ -124,10 +121,11 @@
|
|||
['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',
|
||||
'<@(libchromiumcontent_shared_libraries)',
|
||||
'<(libchromiumcontent_library_dir)/base_static.lib',
|
||||
'<(libchromiumcontent_library_dir)/chromiumcontent.dll.lib',
|
||||
'<(libchromiumcontent_library_dir)/chromiumviews.lib',
|
||||
'<(libchromiumcontent_library_dir)/sandbox_static.lib',
|
||||
],
|
||||
},
|
||||
}],
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
{
|
||||
'includes': [
|
||||
'vendor/download/libchromiumcontent/filenames.gypi',
|
||||
],
|
||||
'variables': {
|
||||
'libchromiumcontent_dir': 'vendor/download/libchromiumcontent',
|
||||
'libchromiumcontent_library_dir': '<(libchromiumcontent_dir)/Release',
|
||||
'libchromiumcontent_include_dir': '<(libchromiumcontent_dir)/src',
|
||||
'libchromiumcontent_resources_dir': '<(libchromiumcontent_library_dir)',
|
||||
'libchromiumcontent_src_dir': '<(libchromiumcontent_dir)/src',
|
||||
|
||||
'mac_deployment_target%': '10.8',
|
||||
'mac_sdkroot%': 'macosx',
|
||||
|
||||
|
@ -72,7 +75,7 @@
|
|||
'SK_IGNORE_GPU_DITHER',
|
||||
],
|
||||
'msvs_configuration_attributes': {
|
||||
'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)',
|
||||
'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)',
|
||||
'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
|
||||
'CharacterSet': '1',
|
||||
},
|
||||
|
|
|
@ -13,42 +13,43 @@ DOWNLOAD_DIR = os.path.join(VENDOR_DIR, 'download')
|
|||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
return (update_submodules() or
|
||||
download_libchromiumcontent(args.commit, args.url))
|
||||
args = parse_args()
|
||||
return (update_submodules() or
|
||||
download_libchromiumcontent(args.commit, args.url))
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Bootstrap this project')
|
||||
parser.add_argument('-c', '--commit', nargs='?', default='HEAD',
|
||||
help='The commit of libchromiumcontent to download.')
|
||||
parser.add_argument('url', help='The base URL from which to download '
|
||||
'libchromiumcontent (i.e., the URL you passed to '
|
||||
'libchromiumcontent\'s script/upload script')
|
||||
return parser.parse_args()
|
||||
parser = argparse.ArgumentParser(description='Bootstrap this project')
|
||||
parser.add_argument('-c', '--commit', nargs='?', default='HEAD',
|
||||
help='The commit of libchromiumcontent to download.')
|
||||
parser.add_argument('url', help='The base URL from which to download '
|
||||
'libchromiumcontent (i.e., the URL you passed to '
|
||||
'libchromiumcontent\'s script/upload script')
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def update_submodules():
|
||||
return (subprocess.call(['git', 'submodule', 'sync', '--quiet']) or
|
||||
subprocess.call(['git', 'submodule', 'update', '--init',
|
||||
'--recursive']))
|
||||
return
|
||||
return (subprocess.call(['git', 'submodule', 'sync', '--quiet']) or
|
||||
subprocess.call(['git', 'submodule', 'update', '--init',
|
||||
'--recursive']))
|
||||
|
||||
|
||||
def download_libchromiumcontent(commit, url):
|
||||
mkdir_p(DOWNLOAD_DIR)
|
||||
download = os.path.join(VENDOR_DIR, 'libchromiumcontent', 'script',
|
||||
'download')
|
||||
return subprocess.call([sys.executable, download, '-f', '-c', commit, url,
|
||||
os.path.join(DOWNLOAD_DIR, 'libchromiumcontent')])
|
||||
mkdir_p(DOWNLOAD_DIR)
|
||||
download = os.path.join(VENDOR_DIR, 'libchromiumcontent', 'script',
|
||||
'download')
|
||||
return subprocess.call([sys.executable, download, '-f', '-c', commit, url,
|
||||
os.path.join(DOWNLOAD_DIR, 'libchromiumcontent')])
|
||||
|
||||
|
||||
def mkdir_p(path):
|
||||
try:
|
||||
os.makedirs(path)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
try:
|
||||
os.makedirs(path)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
sys.exit(main())
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
|
||||
"""Prints the absolute path of the root of brightray's source tree.
|
||||
"""
|
||||
|
||||
|
||||
print os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
2
brightray/vendor/libchromiumcontent
vendored
2
brightray/vendor/libchromiumcontent
vendored
|
@ -1 +1 @@
|
|||
Subproject commit cb8ec5790c07bad7c11e8fb16e767ccef7f50ecb
|
||||
Subproject commit e19d6d778ff3c574906b832102783cb80f5a43c1
|
Loading…
Reference in a new issue