# 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', 'about_credits_file': '<(SHARED_INTERMEDIATE_DIR)/about_credits.html', 'framework_name': 'Chromium Embedded Framework', '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'], }, }], ['OS=="mac"', { 'targets': [ { 'target_name': 'cef_framework', 'type': 'shared_library', 'product_name': '<(framework_name)', 'mac_bundle': 1, 'mac_bundle_resources': [ '<(PRODUCT_DIR)/cef.pak', '<(PRODUCT_DIR)/cef_100_percent.pak', '<(PRODUCT_DIR)/cef_200_percent.pak', '<(PRODUCT_DIR)/devtools_resources.pak', '<(PRODUCT_DIR)/icudtl.dat', 'libcef/resources/framework-Info.plist', ], 'mac_bundle_resources!': [ 'libcef/resources/framework-Info.plist', ], 'xcode_settings': { # Default path that will be changed by install_name_tool in dependent targets. 'INSTALL_PATH': '@executable_path', 'DYLIB_INSTALL_NAME_BASE': '@executable_path', 'LD_DYLIB_INSTALL_NAME': '@executable_path/<(framework_name)', # 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)', 'INFOPLIST_FILE': 'libcef/resources/framework-Info.plist', }, 'dependencies': [ 'cef_pak', 'libcef_static', ], 'defines': [ 'BUILDING_CEF_SHARED', ], 'include_dirs': [ '.', ], 'sources': [ '<@(includes_common)', '<@(includes_capi)', '<@(libcef_sources_common)', ], 'postbuilds': [ { # Modify the Info.plist as needed. The script explains why # this is needed. This is also done in the chrome target. # The framework needs the Breakpad keys if this feature is # enabled. It does not need the Keystone keys; these always # come from the outer application bundle. The framework # doesn't currently use the SCM keys for anything, # but this seems like a really good place to store them. 'postbuild_name': 'Tweak Info.plist', 'action': ['../build/mac/tweak_info_plist.py', '--breakpad=1', '--keystone=0', '--scm=1', '--version=<(chrome_version)', '--branding=<(framework_name)'], }, ], 'copies': [ { # Copy binaries for HTML5 audio/video and PDF support. 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries', 'files': [ '<(PRODUCT_DIR)/ffmpegsumo.so', '<(PRODUCT_DIR)/PDF.plugin', ], }, { # Copy binaries for breakpad support. 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources', 'files': [ '<(PRODUCT_DIR)/crash_inspector', '<(PRODUCT_DIR)/crash_report_sender.app', ], }, ], }, # target cef_framework { 'target_name': 'cefclient_helper_app', 'type': 'executable', 'variables': { 'enable_wexit_time_destructors': 1, }, 'product_name': 'cefclient Helper', 'mac_bundle': 1, 'dependencies': [ 'cef_framework', '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' ], 'link_settings': { 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/AppKit.framework', ], }, 'sources': [ '<@(cefclient_sources_mac_helper)', ], # TODO(mark): Come up with a fancier way to do this. It should only # be necessary to list helper-Info.plist once, not the three times it # is listed here. 'mac_bundle_resources!': [ 'tests/cefclient/mac/helper-Info.plist', ], # TODO(mark): For now, don't put any resources into this app. Its # resources directory will be a symbolic link to the browser app's # resources directory. 'mac_bundle_resources/': [ ['exclude', '.*'], ], 'xcode_settings': { 'INFOPLIST_FILE': 'tests/cefclient/mac/helper-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'], }, 'postbuilds': [ { # The framework defines its load-time path # (DYLIB_INSTALL_NAME_BASE) relative to the main executable # (chrome). A different relative path needs to be used in # cefclient_helper_app. 'postbuild_name': 'Fix Framework Link', 'action': [ 'install_name_tool', '-change', '@executable_path/<(framework_name)', '@executable_path/../../../../Frameworks/<(framework_name).framework/<(framework_name)', '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}' ], }, { # Modify the Info.plist as needed. The script explains why this # is needed. This is also done in the chrome and chrome_dll # targets. In this case, --breakpad=0, --keystone=0, and --scm=0 # are used because Breakpad, Keystone, and SCM keys are # never placed into the helper. 'postbuild_name': 'Tweak Info.plist', 'action': ['../build/mac/tweak_info_plist.py', '--breakpad=0', '--keystone=0', '--scm=0'], }, ], }, # target cefclient_helper_app { 'target_name': 'cefsimple_helper_app', 'type': 'executable', 'variables': { 'enable_wexit_time_destructors': 1, }, 'product_name': 'cefsimple Helper', 'mac_bundle': 1, 'dependencies': [ 'cef_framework', 'libcef_dll_wrapper', ], 'defines': [ 'USING_CEF_SHARED', ], 'include_dirs': [ '.', # cefsimple includes are relative to the tests directory to make # creation of binary releases easier. 'tests' ], 'link_settings': { 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/AppKit.framework', ], }, 'sources': [ '<@(cefsimple_sources_mac_helper)', ], # TODO(mark): Come up with a fancier way to do this. It should only # be necessary to list helper-Info.plist once, not the three times it # is listed here. 'mac_bundle_resources!': [ 'tests/cefsimple/mac/helper-Info.plist', ], # TODO(mark): For now, don't put any resources into this app. Its # resources directory will be a symbolic link to the browser app's # resources directory. 'mac_bundle_resources/': [ ['exclude', '.*'], ], 'xcode_settings': { 'INFOPLIST_FILE': 'tests/cefsimple/mac/helper-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'], }, 'postbuilds': [ { # The framework defines its load-time path # (DYLIB_INSTALL_NAME_BASE) relative to the main executable # (chrome). A different relative path needs to be used in # cefsimple_helper_app. 'postbuild_name': 'Fix Framework Link', 'action': [ 'install_name_tool', '-change', '@executable_path/<(framework_name)', '@executable_path/../../../../Frameworks/<(framework_name).framework/<(framework_name)', '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}' ], }, { # Modify the Info.plist as needed. The script explains why this # is needed. This is also done in the chrome and chrome_dll # targets. In this case, --breakpad=0, --keystone=0, and --scm=0 # are used because Breakpad, Keystone, and SCM keys are # never placed into the helper. 'postbuild_name': 'Tweak Info.plist', 'action': ['../build/mac/tweak_info_plist.py', '--breakpad=0', '--keystone=0', '--scm=0'], }, ], }, # target cefsimple_helper_app { 'target_name': 'cef_unittests_helper_app', 'type': 'executable', 'product_name': 'cef_unittests Helper', 'mac_bundle': 1, 'dependencies': [ '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/base.gyp:base_i18n', '<(DEPTH)/base/base.gyp:test_support_base', '<(DEPTH)/testing/gtest.gyp:gtest', '<(DEPTH)/third_party/icu/icu.gyp:icui18n', '<(DEPTH)/third_party/icu/icu.gyp:icuuc', 'cef_framework', 'libcef_dll_wrapper', ], 'defines': [ 'USING_CEF_SHARED', ], 'include_dirs': [ '.', ], 'sources': [ 'tests/cefclient/client_app.cpp', 'tests/cefclient/client_app.h', 'tests/cefclient/client_switches.cpp', 'tests/cefclient/client_switches.h', 'tests/cefclient/process_helper_mac.cpp', 'tests/unittests/client_app_delegates.cc', 'tests/unittests/cookie_unittest.cc', 'tests/unittests/dom_unittest.cc', 'tests/unittests/frame_unittest.cc', 'tests/unittests/message_router_unittest.cc', 'tests/unittests/navigation_unittest.cc', 'tests/unittests/process_message_unittest.cc', 'tests/unittests/request_handler_unittest.cc', 'tests/unittests/request_unittest.cc', 'tests/unittests/routing_test_handler.cc', 'tests/unittests/routing_test_handler.h', 'tests/unittests/scheme_handler_unittest.cc', 'tests/unittests/urlrequest_unittest.cc', 'tests/unittests/test_handler.cc', 'tests/unittests/test_handler.h', 'tests/unittests/test_suite.cc', 'tests/unittests/test_suite.h', 'tests/unittests/test_util.cc', 'tests/unittests/test_util.h', 'tests/unittests/tracing_unittest.cc', 'tests/unittests/v8_unittest.cc', ], # TODO(mark): Come up with a fancier way to do this. It should only # be necessary to list helper-Info.plist once, not the three times it # is listed here. 'mac_bundle_resources!': [ 'tests/cefclient/mac/helper-Info.plist', ], # TODO(mark): For now, don't put any resources into this app. Its # resources directory will be a symbolic link to the browser app's # resources directory. 'mac_bundle_resources/': [ ['exclude', '.*'], ], 'xcode_settings': { 'INFOPLIST_FILE': 'tests/cefclient/mac/helper-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'], }, 'postbuilds': [ { # The framework defines its load-time path # (DYLIB_INSTALL_NAME_BASE) relative to the main executable # (chrome). A different relative path needs to be used in # cefclient_helper_app. 'postbuild_name': 'Fix Framework Link', 'action': [ 'install_name_tool', '-change', '@executable_path/<(framework_name)', '@executable_path/../../../../Frameworks/<(framework_name).framework/<(framework_name)', '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}' ], }, { # Modify the Info.plist as needed. The script explains why this # is needed. This is also done in the chrome and chrome_dll # targets. In this case, --breakpad=0, --keystone=0, and --scm=0 # are used because Breakpad, Keystone, and SCM keys are # never placed into the helper. 'postbuild_name': 'Tweak Info.plist', 'action': ['../build/mac/tweak_info_plist.py', '--breakpad=0', '--keystone=0', '--scm=0'], }, ], }, # target cef_unittests_helper_app ], }, { # OS!="mac" 'targets': [ { 'target_name': 'libcef', 'type': 'shared_library', 'msvs_guid': 'C13650D5-CF1A-4259-BE45-B1EBA6280E47', 'dependencies': [ 'libcef_static', ], 'defines': [ 'BUILDING_CEF_SHARED', ], 'include_dirs': [ '.', ], 'sources': [ '<@(includes_common)', '<@(includes_capi)', '<@(libcef_sources_common)', ], '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)', }, }, }, }, 'sources': [ '<@(includes_win)', # TODO(cef): Remove ui_unscaled_resources.rc once custom cursor # resources can be loaded via ResourceBundle. See crbug.com/147663. '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc', 'libcef_dll/libcef_dll.rc', ], 'link_settings': { 'libraries': [ '-lcomctl32.lib', ], }, 'msvs_settings': { 'VCLinkerTool': { # Generate a PDB symbol file for both Debug and Release builds. 'GenerateDebugInformation': 'true', }, 'VCManifestTool': { 'AdditionalManifestFiles': [ 'libcef_dll/libcef.dll.manifest', ], }, }, }], [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 'dependencies':[ '<(DEPTH)/base/allocator/allocator.gyp:allocator', ], }], ], }], }], # OS!="mac" [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 'targets': [ { 'target_name': 'gtk', 'type': 'none', 'variables': { # gtk requires gmodule, but it does not list it as a dependency # in some misconfigured systems. 'gtk_packages': 'gmodule-2.0 gtk+-2.0 gthread-2.0 gtk+-unix-print-2.0', }, 'direct_dependent_settings': { 'cflags': [ '