# # Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following disclaimer # in the documentation and/or other materials provided with the # distribution. # * Neither the name of Google Inc. nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # { 'variables': { 'ahem_path': '../../Source/testing/data/fonts/AHEM____.TTF', 'source_dir': '../../Source', 'conditions': [ ['OS=="linux"', { 'use_custom_freetype%': 1, }, { 'use_custom_freetype%': 0, }], ], }, 'includes': [ '../../Source/build/features.gypi', '../../Source/testing/plugin/plugin.gypi', ], 'targets': [ { 'target_name': 'TestNetscapePlugIn', 'type': 'loadable_module', 'sources': [ '<@(test_plugin_files)' ], 'dependencies': [ '../config.gyp:unittest_config', '<(DEPTH)/third_party/npapi/npapi.gyp:npapi', ], 'include_dirs': [ '<(DEPTH)', '<(source_dir)/testing/plugin/', ], 'conditions': [ ['OS=="mac"', { 'mac_bundle': 1, 'product_extension': 'plugin', 'link_settings': { 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/Carbon.framework', '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework', '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework', ] }, 'xcode_settings': { 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', 'INFOPLIST_FILE': 'plugin/mac/Info.plist', }, }], ['os_posix == 1 and OS != "mac"', { 'cflags': [ '-fvisibility=default', ], }], ['OS=="win"', { 'defines': [ # This seems like a hack, but this is what Safari Win does. 'snprintf=_snprintf', ], 'sources': [ 'plugin/win/TestNetscapePlugin.def', 'plugin/win/TestNetscapePlugin.rc', ], # The .rc file requires that the name of the dll is npTestNetscapePlugIn.dll. 'product_name': 'npTestNetscapePlugIn', # Disable c4267 warnings until we fix size_t to int truncations. 'msvs_disabled_warnings': [ 4267, ], }], ], }, { 'target_name': 'copy_TestNetscapePlugIn', 'type': 'none', 'dependencies': [ 'TestNetscapePlugIn', ], 'conditions': [ ['OS=="win"', { 'copies': [{ 'destination': '<(PRODUCT_DIR)/plugins', 'files': ['<(PRODUCT_DIR)/npTestNetscapePlugIn.dll'], }], }], ['OS=="mac"', { 'dependencies': ['TestNetscapePlugIn'], 'copies': [{ 'destination': '<(PRODUCT_DIR)/plugins/', 'files': ['<(PRODUCT_DIR)/TestNetscapePlugIn.plugin/'], }], }], ['os_posix == 1 and OS != "mac"', { 'copies': [{ 'destination': '<(PRODUCT_DIR)/plugins', 'files': ['<(PRODUCT_DIR)/libTestNetscapePlugIn.so'], }], }], ], }, ], # targets 'conditions': [ ['gcc_version>=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'], }, }], ['clang==1', { 'target_defaults': { # FIXME: Add -Wglobal-constructors after fixing existing bugs. }, }], ], # conditions }