# 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', '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': [ { # Dummy target to allow cefclient to require plugin_carbon_interpose # to build without actually linking to the resulting library. 'target_name': 'interpose_dependency_shim', 'type': 'executable', 'variables': { 'enable_wexit_time_destructors': 1, }, 'dependencies': [ 'plugin_carbon_interpose', ], # In release, we end up with a strip step that is unhappy if there is # no binary. Rather than check in a new file for this temporary hack, # just generate a source file on the fly. 'actions': [ { 'action_name': 'generate_stub_main', 'process_outputs_as_sources': 1, 'inputs': [], 'outputs': [ '<(INTERMEDIATE_DIR)/dummy_main.c' ], 'action': [ 'bash', '-c', 'echo "int main() { return 0; }" > <(INTERMEDIATE_DIR)/dummy_main.c' ], }, ], }, { # dylib for interposing Carbon calls in the plugin process. 'target_name': 'plugin_carbon_interpose', 'type': 'shared_library', 'variables': { 'enable_wexit_time_destructors': 1, }, # This target must not depend on static libraries, else the code in # those libraries would appear twice in plugin processes: Once from # Chromium Framework, and once from this dylib. 'dependencies': [ 'libcef', ], 'conditions': [ ['component=="shared_library"', { 'dependencies': [ '<(DEPTH)/webkit/support/webkit_support.gyp:glue', '<(DEPTH)/content/content.gyp:content_plugin', ], }], ], 'sources': [ '<(DEPTH)/content/plugin/plugin_carbon_interpose_mac.cc', ], 'include_dirs': [ '..', ], 'link_settings': { 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/Carbon.framework', ], }, 'xcode_settings': { 'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)', 'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)', }, '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 # libplugin_carbon_interpose.dylib. 'postbuild_name': 'Fix Framework Link', 'action': [ 'install_name_tool', '-change', '@executable_path/libcef.dylib', '@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Libraries/libcef.dylib', '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}' ], }, ], }, { 'target_name': 'cefclient_helper_app', 'type': 'executable', 'variables': { 'enable_wexit_time_destructors': 1, }, 'product_name': 'cefclient Helper', 'mac_bundle': 1, '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' ], '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/libcef.dylib', '@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Libraries/libcef.dylib', '${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': '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_pak', 'libcef', '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/navigation_unittest.cc', 'tests/unittests/process_message_unittest.cc', 'tests/unittests/request_handler_unittest.cc', 'tests/unittests/request_unittest.cc', '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/libcef.dylib', '@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Libraries/libcef.dylib', '${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" [ '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. # gtkglext is required by the cefclient OSR example. 'gtk_packages': 'gmodule-2.0 gtk+-2.0 gthread-2.0 gtkglext-1.0', }, 'direct_dependent_settings': { 'cflags': [ '