# 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': { 'pkg-config': 'pkg-config', 'chromium_code': 1, 'repack_locales_cmd': ['python', 'tools/repack_locales.py'], 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/cef', 'revision': '=46', { 'target_defaults': { # Disable warnings about c++0x compatibility, as some names (such # as nullptr) conflict with upcoming c++0x types. 'cflags_cc': ['-Wno-c++0x-compat'], }, }], ], 'includes': [ # Bring in the source file lists. 'cef_paths2.gypi', ], 'targets': [ { 'target_name': 'cefclient', 'type': 'executable', 'mac_bundle': 1, 'msvs_guid': '6617FED9-C5D4-4907-BF55-A90062A6683F', 'dependencies': [ '<(DEPTH)/third_party/npapi/npapi.gyp:npapi', 'libcef', 'libcef_dll_wrapper', ], 'defines': [ 'USING_CEF_SHARED', ], 'include_dirs': [ '.', # cefclient includes are relative to the tests directory to make # creation of binary releases easier. 'tests' ], 'sources': [ '<@(includes_common)', '<@(includes_wrapper)', '<@(cefclient_sources_common)', ], 'mac_bundle_resources': [ '<@(cefclient_bundle_resources_mac)', '<(grit_out_dir)/devtools_resources.pak', ], '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)', ], }, ], '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': [ '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.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', ], }, { # 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', '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', ], }, 'sources': [ '<@(includes_mac)', '<@(cefclient_sources_mac)', ], }], [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 'sources': [ '<@(includes_linux)', '<@(cefclient_sources_linux)', ], '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)', ], }, { 'action_name': 'repack_resources', 'variables': { 'pak_inputs': [ '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.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/ui_resources/ui_resources_100_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.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)/cef_unittests.app/Contents/MacOS/', 'files': [ '<(PRODUCT_DIR)/libcef.dylib', ], }, ], 'link_settings': { 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/AppKit.framework', ], }, 'sources': [ 'tests/unittests/run_all_unittests_mac.mm', ], }], ], }, { 'target_name': 'libcef', 'type': 'shared_library', 'msvs_guid': 'C13650D5-CF1A-4259-BE45-B1EBA6280E47', 'dependencies': [ '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/base.gyp:base_i18n', '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl', '<(DEPTH)/net/net.gyp:net', '<(DEPTH)/net/net.gyp:net_resources', '<(DEPTH)/printing/printing.gyp:printing', '<(DEPTH)/sdch/sdch.gyp:sdch', '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/third_party/bzip2/bzip2.gyp:bzip2', '<(DEPTH)/third_party/icu/icu.gyp:icui18n', '<(DEPTH)/third_party/icu/icu.gyp:icuuc', '<(DEPTH)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase', '<(DEPTH)/third_party/libjpeg_turbo/libjpeg.gyp:libjpeg', '<(DEPTH)/third_party/libpng/libpng.gyp:libpng', '<(DEPTH)/third_party/libxml/libxml.gyp:libxml', '<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt', '<(DEPTH)/third_party/modp_b64/modp_b64.gyp:modp_b64', '<(DEPTH)/third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore', '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', '<(DEPTH)/third_party/zlib/zlib.gyp:minizip', '<(DEPTH)/third_party/zlib/zlib.gyp:zlib', '<(DEPTH)/ui/ui.gyp:ui_resources', '<(DEPTH)/ui/ui.gyp:ui', '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', '<(DEPTH)/webkit/support/webkit_support.gyp:glue', '<(DEPTH)/webkit/support/webkit_support.gyp:user_agent', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_gpu', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_storage', '<(DEPTH)/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)', '<@(includes_capi)', '<@(libcef_sources_common)', ], 'xcode_settings': { 'INSTALL_PATH': '@executable_path', 'DYLIB_INSTALL_NAME_BASE': '@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'], 'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)', 'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)', }, 'conditions': [ ['OS=="win"', { 'dependencies': [ '<(DEPTH)/base/allocator/allocator.gyp:allocator', '<(DEPTH)/breakpad/breakpad.gyp:breakpad_handler', '<(DEPTH)/third_party/angle/src/build_angle.gyp:libEGL', '<(DEPTH)/third_party/angle/src/build_angle.gyp:libGLESv2', ], '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', '-llocationapi.lib', ], }, 'msvs_settings': { 'VCLinkerTool': { # Generate a PDB symbol file for both Debug and Release builds. 'GenerateDebugInformation': 'true', }, }, }], [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 'dependencies':[ '<(DEPTH)/base/allocator/allocator.gyp:allocator', ], 'direct_dependent_settings': { 'cflags': [ '