# 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, 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/cef', }, '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': [ 'cef_pak', '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)', ], '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', # Necessary to avoid an "install_name_tool: changing install names or # rpaths can't be redone" error. 'OTHER_LDFLAGS': ['-Wl,-headerpad_max_install_names'], }, 'conditions': [ ['OS=="win" and win_use_allocator_shim==1', { 'dependencies': [ '<(DEPTH)/base/allocator/allocator.gyp:allocator', ], }], ['OS=="win"', { 'configurations': { 'Debug_Base': { 'msvs_settings': { 'VCLinkerTool': { 'LinkIncremental': '<(msvs_large_module_debug_link_mode)', }, }, }, }, 'msvs_settings': { 'VCLinkerTool': { # Set /SUBSYSTEM:WINDOWS. 'SubSystem': '2', 'EntryPointSymbol' : 'wWinMainCRTStartup', }, }, 'link_settings': { 'libraries': [ '-lcomctl32.lib', '-lshlwapi.lib', '-lrpcrt4.lib', ], }, 'sources': [ '<@(includes_win)', '<@(cefclient_sources_win)', ], }], ['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', { 'dependencies': [ '<(DEPTH)/sandbox/sandbox.gyp:sandbox', ], }], ['toolkit_uses_gtk == 1', { 'dependencies': [ '<(DEPTH)/build/linux/system.gyp:gtk', ], }], [ 'OS=="mac"', { 'product_name': 'cefclient', 'dependencies': [ 'cefclient_helper_app', ], 'copies': [ { # Add library dependencies to the bundle. 'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/Frameworks/Chromium Embedded Framework.framework/Libraries/', 'files': [ '<(PRODUCT_DIR)/libcef.dylib', '<(PRODUCT_DIR)/ffmpegsumo.so', ], }, { # Add localized resources to the bundle. 'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/Frameworks/Chromium Embedded Framework.framework/Resources/', '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)', ], }, ], }, { # OS!="win" '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)', ], }, ], }], ['OS != "mac"', { 'copies': [ { 'destination': '<(PRODUCT_DIR)/locales', 'files': [ '