# Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights # reserved. Use of this source code is governed by a BSD-style license that # can be found in the LICENSE file. { 'variables': { 'chromium_code': 1, 'repack_locales_cmd': ['python', 'tools/repack_locales.py'], 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/cef', }, 'includes': [ # Bring in the source file lists for cefclient. 'cef_paths.gypi', ], 'targets': [ { 'target_name': 'cefclient', 'type': 'executable', 'mac_bundle': 1, 'msvs_guid': '6617FED9-C5D4-4907-BF55-A90062A6683F', 'dependencies': [ '../third_party/npapi/npapi.gyp:npapi', 'libcef', 'libcef_dll_wrapper', ], 'defines': [ 'USING_CEF_SHARED', ], 'include_dirs': [ '.', '..', ], 'sources': [ '<@(includes_common)', '<@(cefclient_sources_common)', ], 'mac_bundle_resources': [ '<@(cefclient_bundle_resources_mac)', ], 'mac_bundle_resources!': [ # TODO(mark): Come up with a fancier way to do this (mac_info_plist?) # that automatically sets the correct INFOPLIST_FILE setting and adds # the file to a source group. 'tests/cefclient/mac/Info.plist', ], 'xcode_settings': { 'INFOPLIST_FILE': 'tests/cefclient/mac/Info.plist', }, 'conditions': [ ['OS=="win"', { 'variables': { 'repack_path': '../tools/grit/grit/format/repack.py', }, 'actions': [ { 'action_name': 'repack_locales', 'inputs': [ 'tools/repack_locales.py', # NOTE: Ideally the common command args would be shared # amongst inputs/outputs/action, but the args include shell # variables which need to be passed intact, and command # expansion wants to expand the shell variables. Adding the # explicit quoting here was the only way it seemed to work. '>!@(<(repack_locales_cmd) -i -g \"<(grit_out_dir)\" -s \"<(SHARED_INTERMEDIATE_DIR)\" -x \"<(INTERMEDIATE_DIR)\" <(locales))', ], 'outputs': [ '>!@(<(repack_locales_cmd) -o -g \"<(grit_out_dir)\" -s \"<(SHARED_INTERMEDIATE_DIR)\" -x \"<(INTERMEDIATE_DIR)\" <(locales))', ], 'action': [ '<@(repack_locales_cmd)', '-g', '<(grit_out_dir)', '-s', '<(SHARED_INTERMEDIATE_DIR)', '-x', '<(INTERMEDIATE_DIR)', '<@(locales)', ], }, { # On Windows chrome.pak will contain only the inspector resources. # Other resources are built into libcef.dll. 'action_name': 'repack_resources', 'variables': { 'pak_inputs': [ '<(grit_out_dir)/devtools_resources.pak', ], }, 'inputs': [ '<(repack_path)', '<@(pak_inputs)', ], 'outputs': [ '<(INTERMEDIATE_DIR)/repack/chrome.pak', ], 'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'], }, ], 'copies': [ { 'destination': '<(PRODUCT_DIR)/locales', 'files': [ '!@(<(repack_locales_cmd) -i -g \'<(grit_out_dir)\' -s \'<(SHARED_INTERMEDIATE_DIR)\' -x \'<(INTERMEDIATE_DIR)\' <(locales))', ], 'outputs': [ '>!@(<(repack_locales_cmd) -o -g \'<(grit_out_dir)\' -s \'<(SHARED_INTERMEDIATE_DIR)\' -x \'<(INTERMEDIATE_DIR)\' <(locales))', ], 'action': [ '<@(repack_locales_cmd)', '-g', '<(grit_out_dir)', '-s', '<(SHARED_INTERMEDIATE_DIR)', '-x', '<(INTERMEDIATE_DIR)', '<@(locales)', ], }, { 'action_name': 'repack_resources', 'process_outputs_as_mac_bundle_resources': 1, 'variables': { 'pak_inputs': [ '<(grit_out_dir)/devtools_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak', ], }, 'inputs': [ '<(repack_path)', '<@(pak_inputs)', ], 'outputs': [ '<(INTERMEDIATE_DIR)/repack/chrome.pak', ], 'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'], }, ], 'copies': [ { # Add library dependencies to the bundle. 'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/MacOS/', 'files': [ '<(PRODUCT_DIR)/libcef.dylib', '<(PRODUCT_DIR)/ffmpegsumo.so', ], }, { # Add the WebCore resources to the bundle. 'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/', 'files': [ '../third_party/WebKit/Source/WebCore/Resources/', ], }, ], 'link_settings': { 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/AppKit.framework', ], }, 'sources': [ '<@(includes_mac)', '<@(cefclient_sources_mac)', ], }], [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 'sources': [ '<@(includes_linux)', '<@(cefclient_sources_linux)', ], }], ], }, { 'target_name': 'cef_unittests', 'type': 'executable', 'msvs_guid': '8500027C-B11A-11DE-A16E-B80256D89593', 'dependencies': [ '../base/base.gyp:base', '../base/base.gyp:base_i18n', '../base/base.gyp:test_support_base', '../testing/gtest.gyp:gtest', '../third_party/icu/icu.gyp:icui18n', '../third_party/icu/icu.gyp:icuuc', 'libcef', 'libcef_dll_wrapper', ], 'sources': [ 'tests/unittests/content_filter_unittest.cc', 'tests/unittests/cookie_unittest.cc', 'tests/unittests/dom_unittest.cc', 'tests/unittests/navigation_unittest.cc', 'tests/unittests/request_unittest.cc', 'tests/unittests/run_all_unittests.cc', 'tests/unittests/scheme_handler_unittest.cc', 'tests/unittests/stream_unittest.cc', 'tests/unittests/string_unittest.cc', 'tests/unittests/storage_unittest.cc', 'tests/unittests/test_handler.h', 'tests/unittests/test_suite.cc', 'tests/unittests/test_suite.h', 'tests/unittests/url_unittest.cc', 'tests/unittests/v8_unittest.cc', 'tests/unittests/web_urlrequest_unittest.cc', 'tests/unittests/xml_reader_unittest.cc', 'tests/unittests/zip_reader_unittest.cc', ], 'include_dirs': [ '.', '..', ], }, { 'target_name': 'libcef', 'type': 'shared_library', 'msvs_guid': 'C13650D5-CF1A-4259-BE45-B1EBA6280E47', 'dependencies': [ '../base/base.gyp:base', '../base/base.gyp:base_i18n', '../build/temp_gyp/googleurl.gyp:googleurl', '../media/media.gyp:media', '../net/net.gyp:net', '../net/net.gyp:net_resources', '../printing/printing.gyp:printing', '../sdch/sdch.gyp:sdch', '../skia/skia.gyp:skia', '../third_party/bzip2/bzip2.gyp:bzip2', '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', '../third_party/icu/icu.gyp:icui18n', '../third_party/icu/icu.gyp:icuuc', '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase', '../third_party/libjpeg_turbo/libjpeg.gyp:libjpeg', '../third_party/libpng/libpng.gyp:libpng', '../third_party/libxml/libxml.gyp:libxml', '../third_party/libxslt/libxslt.gyp:libxslt', '../third_party/modp_b64/modp_b64.gyp:modp_b64', '../third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore', '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', '../third_party/zlib/zlib.gyp:zlib', '../ui/ui.gyp:gfx_resources', '../ui/ui.gyp:ui', '../v8/tools/gyp/v8.gyp:v8', '../webkit/support/webkit_support.gyp:appcache', '../webkit/support/webkit_support.gyp:blob', '../webkit/support/webkit_support.gyp:database', '../webkit/support/webkit_support.gyp:fileapi', '../webkit/support/webkit_support.gyp:glue', '../webkit/support/webkit_support.gyp:quota', '../webkit/support/webkit_support.gyp:webkit_gpu', '../webkit/support/webkit_support.gyp:webkit_resources', '../webkit/support/webkit_support.gyp:webkit_strings', 'libcef_static', ], 'defines': [ 'BUILDING_CEF_SHARED', ], 'include_dirs': [ '.', '..', ], # Avoid "RC1102: internal error : too many arguments to RCPP" error by # explicitly specifying a short list of resource include directories. 'resource_include_dirs' : [ '.', '..', ], 'sources': [ '<@(includes_common)', 'libcef_dll/cef_logging.h', 'libcef_dll/cpptoc/browser_cpptoc.cc', 'libcef_dll/cpptoc/browser_cpptoc.h', 'libcef_dll/cpptoc/cpptoc.h', 'libcef_dll/cpptoc/domdocument_cpptoc.cc', 'libcef_dll/cpptoc/domdocument_cpptoc.h', 'libcef_dll/cpptoc/domevent_cpptoc.cc', 'libcef_dll/cpptoc/domevent_cpptoc.h', 'libcef_dll/cpptoc/domnode_cpptoc.cc', 'libcef_dll/cpptoc/domnode_cpptoc.h', 'libcef_dll/cpptoc/drag_data_cpptoc.cc', 'libcef_dll/cpptoc/drag_data_cpptoc.h', 'libcef_dll/cpptoc/frame_cpptoc.cc', 'libcef_dll/cpptoc/frame_cpptoc.h', 'libcef_dll/cpptoc/post_data_cpptoc.cc', 'libcef_dll/cpptoc/post_data_cpptoc.h', 'libcef_dll/cpptoc/post_data_element_cpptoc.cc', 'libcef_dll/cpptoc/post_data_element_cpptoc.h', 'libcef_dll/cpptoc/request_cpptoc.cc', 'libcef_dll/cpptoc/request_cpptoc.h', 'libcef_dll/cpptoc/response_cpptoc.cc', 'libcef_dll/cpptoc/response_cpptoc.h', 'libcef_dll/cpptoc/scheme_handler_callback_cpptoc.cc', 'libcef_dll/cpptoc/scheme_handler_callback_cpptoc.h', 'libcef_dll/cpptoc/stream_reader_cpptoc.cc', 'libcef_dll/cpptoc/stream_reader_cpptoc.h', 'libcef_dll/cpptoc/stream_writer_cpptoc.cc', 'libcef_dll/cpptoc/stream_writer_cpptoc.h', 'libcef_dll/cpptoc/v8context_cpptoc.cc', 'libcef_dll/cpptoc/v8context_cpptoc.h', 'libcef_dll/cpptoc/v8value_cpptoc.cc', 'libcef_dll/cpptoc/v8value_cpptoc.h', 'libcef_dll/cpptoc/web_urlrequest_cpptoc.cc', 'libcef_dll/cpptoc/web_urlrequest_cpptoc.h', 'libcef_dll/cpptoc/xml_reader_cpptoc.cc', 'libcef_dll/cpptoc/xml_reader_cpptoc.h', 'libcef_dll/cpptoc/zip_reader_cpptoc.cc', 'libcef_dll/cpptoc/zip_reader_cpptoc.h', 'libcef_dll/ctocpp/client_ctocpp.cc', 'libcef_dll/ctocpp/client_ctocpp.h', 'libcef_dll/ctocpp/content_filter_ctocpp.cc', 'libcef_dll/ctocpp/content_filter_ctocpp.h', 'libcef_dll/ctocpp/cookie_visitor_ctocpp.cc', 'libcef_dll/ctocpp/cookie_visitor_ctocpp.h', 'libcef_dll/ctocpp/ctocpp.h', 'libcef_dll/ctocpp/display_handler_ctocpp.cc', 'libcef_dll/ctocpp/display_handler_ctocpp.h', 'libcef_dll/ctocpp/domevent_listener_ctocpp.cc', 'libcef_dll/ctocpp/domevent_listener_ctocpp.h', 'libcef_dll/ctocpp/domvisitor_ctocpp.cc', 'libcef_dll/ctocpp/domvisitor_ctocpp.h', 'libcef_dll/ctocpp/download_handler_ctocpp.cc', 'libcef_dll/ctocpp/download_handler_ctocpp.h', 'libcef_dll/ctocpp/drag_handler_ctocpp.cc', 'libcef_dll/ctocpp/drag_handler_ctocpp.h', 'libcef_dll/ctocpp/find_handler_ctocpp.cc', 'libcef_dll/ctocpp/find_handler_ctocpp.h', 'libcef_dll/ctocpp/focus_handler_ctocpp.cc', 'libcef_dll/ctocpp/focus_handler_ctocpp.h', 'libcef_dll/ctocpp/jsbinding_handler_ctocpp.cc', 'libcef_dll/ctocpp/jsbinding_handler_ctocpp.h', 'libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc', 'libcef_dll/ctocpp/jsdialog_handler_ctocpp.h', 'libcef_dll/ctocpp/keyboard_handler_ctocpp.cc', 'libcef_dll/ctocpp/keyboard_handler_ctocpp.h', 'libcef_dll/ctocpp/life_span_handler_ctocpp.cc', 'libcef_dll/ctocpp/life_span_handler_ctocpp.h', 'libcef_dll/ctocpp/load_handler_ctocpp.cc', 'libcef_dll/ctocpp/load_handler_ctocpp.h', 'libcef_dll/ctocpp/menu_handler_ctocpp.cc', 'libcef_dll/ctocpp/menu_handler_ctocpp.h', 'libcef_dll/ctocpp/print_handler_ctocpp.cc', 'libcef_dll/ctocpp/print_handler_ctocpp.h', 'libcef_dll/ctocpp/read_handler_ctocpp.cc', 'libcef_dll/ctocpp/read_handler_ctocpp.h', 'libcef_dll/ctocpp/render_handler_ctocpp.cc', 'libcef_dll/ctocpp/render_handler_ctocpp.h', 'libcef_dll/ctocpp/request_handler_ctocpp.cc', 'libcef_dll/ctocpp/request_handler_ctocpp.h', 'libcef_dll/ctocpp/scheme_handler_ctocpp.cc', 'libcef_dll/ctocpp/scheme_handler_ctocpp.h', 'libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc', 'libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h', 'libcef_dll/ctocpp/storage_visitor_ctocpp.cc', 'libcef_dll/ctocpp/storage_visitor_ctocpp.h', 'libcef_dll/ctocpp/task_ctocpp.cc', 'libcef_dll/ctocpp/task_ctocpp.h', 'libcef_dll/ctocpp/v8accessor_ctocpp.cc', 'libcef_dll/ctocpp/v8accessor_ctocpp.h', 'libcef_dll/ctocpp/v8handler_ctocpp.cc', 'libcef_dll/ctocpp/v8handler_ctocpp.h', 'libcef_dll/ctocpp/web_urlrequest_client_ctocpp.cc', 'libcef_dll/ctocpp/web_urlrequest_client_ctocpp.h', 'libcef_dll/ctocpp/write_handler_ctocpp.cc', 'libcef_dll/ctocpp/write_handler_ctocpp.h', 'libcef_dll/libcef_dll.cc', 'libcef_dll/resource.h', 'libcef_dll/transfer_util.cpp', 'libcef_dll/transfer_util.h', ], 'xcode_settings': { 'INSTALL_PATH': '@executable_path', # The libcef_static target contains ObjC categories. Passing the -ObjC flag # is necessary to properly load them and avoid a "selector not recognized" # runtime error. See http://developer.apple.com/library/mac/#qa/qa1490/_index.html # for more information. 'OTHER_LDFLAGS': ['-Wl,-ObjC'], }, 'conditions': [ ['OS=="win"', { 'dependencies': [ '../breakpad/breakpad.gyp:breakpad_handler', '../third_party/angle/src/build_angle.gyp:libEGL', '../third_party/angle/src/build_angle.gyp:libGLESv2', '../views/views.gyp:views', ], 'sources': [ '<@(includes_win)', '$(OutDir)/obj/global_intermediate/webkit/webkit_chromium_resources.rc', '$(OutDir)/obj/global_intermediate/webkit/webkit_resources.rc', 'libcef_dll/libcef_dll.rc', ], 'link_settings': { 'libraries': [ '-lcomctl32.lib', ], }, }], ], }, { 'target_name': 'libcef_dll_wrapper', 'type': 'static_library', 'msvs_guid': 'A9D6DC71-C0DC-4549-AEA0-3B15B44E86A9', 'dependencies': [ '../third_party/npapi/npapi.gyp:npapi', 'libcef', ], 'defines': [ 'USING_CEF_SHARED', ], 'include_dirs': [ '.', '..', ], 'sources': [ '<@(includes_common)', '<@(libcef_dll_wrapper_sources_common)', ], }, { 'target_name': 'cef_extra_resources', 'type': 'none', 'dependencies': [ '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:generate_devtools_grd', ], # These resources end up in chrome.pak because they are resources # used by internal pages. Putting them in a spearate pak file makes # it easier for us to reference them internally. 'actions': [ { 'action_name': 'devtools_resources', # This can't use ../build/grit_action.gypi because the grd file # is generated a build time, so the trick of using grit_info to get # the real inputs/outputs at GYP time isn't possible. 'variables': { 'grit_cmd': ['python', '../tools/grit/grit.py'], 'grit_grd_file': '<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resources.grd', }, 'inputs': [ '<(grit_grd_file)', '