diff --git a/chromiumcontent.gyp b/chromiumcontent.gyp index 02b60c93..4e2996cf 100644 --- a/chromiumcontent.gyp +++ b/chromiumcontent.gyp @@ -12,9 +12,6 @@ 'dependencies': [ '<(DEPTH)/sandbox/sandbox.gyp:sandbox_static', ], - 'dependencies!': [ - 'test_support_chromiumcontent', - ], }], ], }, @@ -72,29 +69,61 @@ '<(DEPTH)/base/base.gyp:base_prefs_test_support', '<(DEPTH)/content/content.gyp:test_support_content', ], - 'actions': [ - { - 'action_name': 'Create libtest_support_chromiumcontent.a', - 'inputs': [ - '<(PRODUCT_DIR)/libbase_prefs_test_support.a', - '<(PRODUCT_DIR)/libgmock.a', - '<(PRODUCT_DIR)/libgtest.a', - '<(PRODUCT_DIR)/libnet_test_support.a', - '<(PRODUCT_DIR)/libtest_support_base.a', - '<(PRODUCT_DIR)/libtest_support_content.a', - '<(PRODUCT_DIR)/libui_test_support.a', + 'conditions': [ + ['OS=="mac"', { + 'actions': [ + { + 'action_name': 'Create libtest_support_chromiumcontent.a', + 'inputs': [ + '<(PRODUCT_DIR)/libbase_prefs_test_support.a', + '<(PRODUCT_DIR)/libgmock.a', + '<(PRODUCT_DIR)/libgtest.a', + '<(PRODUCT_DIR)/libnet_test_support.a', + '<(PRODUCT_DIR)/libtest_support_base.a', + '<(PRODUCT_DIR)/libtest_support_content.a', + '<(PRODUCT_DIR)/libui_test_support.a', + ], + 'outputs': [ + '<(PRODUCT_DIR)/libtest_support_chromiumcontent.a', + ], + 'action': [ + '/usr/bin/libtool', + '-static', + '-o', + '<@(_outputs)', + '<@(_inputs)', + ], + }, ], - 'outputs': [ - '<(PRODUCT_DIR)/libtest_support_chromiumcontent.a', + }], + ['OS=="win"', { + 'actions': [ + { + 'action_name': 'Create test_support_chromiumcontent.lib', + 'inputs': [ + '<(PRODUCT_DIR)\\obj\\base\\base_prefs_test_support.lib', + '<(PRODUCT_DIR)\\obj\\base\\test_support_base.lib', + '<(PRODUCT_DIR)\\obj\\content\\test_support_content.lib', + '<(PRODUCT_DIR)\\obj\\net\\net_test_support.lib', + '<(PRODUCT_DIR)\\obj\\testing\\gmock.lib', + '<(PRODUCT_DIR)\\obj\\testing\\gtest.lib', + '<(PRODUCT_DIR)\\obj\\ui\\ui_test_support.lib', + ], + 'outputs': [ + '<(PRODUCT_DIR)\\test_support_chromiumcontent.lib', + ], + 'action': [ + 'lib.exe', + '/nologo', + # We can't use <(_outputs) here because that escapes the + # backslash in the path, which confuses lib.exe. + '/OUT:<(PRODUCT_DIR)\\test_support_chromiumcontent.lib', + '<@(_inputs)', + ], + 'msvs_cygwin_shell': 0, + }, ], - 'action': [ - '/usr/bin/libtool', - '-static', - '-o', - '<@(_outputs)', - '<@(_inputs)', - ], - }, + }], ], }, ], diff --git a/chromiumcontent.gypi b/chromiumcontent.gypi index 4aae1972..45897ce6 100644 --- a/chromiumcontent.gypi +++ b/chromiumcontent.gypi @@ -96,11 +96,13 @@ ['exclude', 'debug/debug_on_start_win\.cc$'], ], }], - # sandbox_static.lib gets linked directly into client applications, so - # needs to see symbols decorated with __declspec(dllimport). - ['_target_name=="sandbox_static"', { + # These targets get linked directly into client applications, so need + # to see symbols decorated with __declspec(dllimport). + ['_target_name in ["net_test_support", "sandbox_static", "test_support_content"]', { 'defines!': [ 'BASE_IMPLEMENTATION', + 'CONTENT_IMPLEMENTATION', + 'NET_IMPLEMENTATION', ], }], ['_target_name in ["v8", "v8_snapshot", "v8_nosnapshot", "v8_base", "mksnapshot", "v8_shell", "preparser_lib"]', { diff --git a/script/create-dist b/script/create-dist index 34689652..def171ac 100755 --- a/script/create-dist +++ b/script/create-dist @@ -39,10 +39,13 @@ BINARIES = { 'chromiumcontent.dll.lib', 'icudt.dll', 'libGLESv2.dll', + 'test_support_chromiumcontent.lib', os.path.join('obj', 'base', 'base_static.lib'), os.path.join('obj', 'base', 'base_static.pdb'), + os.path.join('obj', 'net', 'net_test_support.pdb'), os.path.join('obj', 'sandbox', 'sandbox_static.lib'), os.path.join('obj', 'sandbox', 'sandbox_static.pdb'), + os.path.join('obj', 'testing', 'gtest.pdb'), ], }