diff --git a/src/build/merge_libs.gyp b/src/build/merge_libs.gyp new file mode 100644 index 0000000000..62d8d4e5ed --- /dev/null +++ b/src/build/merge_libs.gyp @@ -0,0 +1,65 @@ +# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +{ + 'includes': [ + 'common.gypi', + ], + 'targets': [ + { + 'target_name': 'merged_lib_voice', + 'type': 'none', + 'variables': { + 'autotest_name': 'voe_auto_test', + }, + 'dependencies': [ + '../voice_engine/voice_engine.gyp:<(autotest_name)', + ], + 'actions': [ + { + 'variables': { + 'output_lib_name': 'webrtc_voice_engine', + 'output_lib': '<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)<(output_lib_name)_<(OS)<(STATIC_LIB_SUFFIX)', + }, + 'action_name': 'merge_libs', + 'inputs': ['<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)<(autotest_name)<(EXECUTABLE_SUFFIX)'], + 'outputs': ['<(output_lib)'], + 'action': ['python', + 'merge_libs.py', + '<(PRODUCT_DIR)', + '<(output_lib)'], + }, + ], + }, + { + 'target_name': 'merged_lib', + 'type': 'none', + 'variables': { + 'autotest_name': 'vie_auto_test', + }, + 'dependencies': [ + '../video_engine/video_engine.gyp:<(autotest_name)', + ], + 'actions': [ + { + 'variables': { + 'output_lib_name': 'webrtc', + 'output_lib': '<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)<(output_lib_name)_<(OS)<(STATIC_LIB_SUFFIX)', + }, + 'action_name': 'merge_libs', + 'inputs': ['<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)<(autotest_name)<(EXECUTABLE_SUFFIX)'], + 'outputs': ['<(output_lib)'], + 'action': ['python', + 'merge_libs.py', + '<(PRODUCT_DIR)', + '<(output_lib)'], + }, + ], + }, + ], +} diff --git a/src/video_engine/main/test/AutoTest/vie_auto_test.gypi b/src/video_engine/main/test/AutoTest/vie_auto_test.gypi index 8fef32640f..cd87d02eb8 100644 --- a/src/video_engine/main/test/AutoTest/vie_auto_test.gypi +++ b/src/video_engine/main/test/AutoTest/vie_auto_test.gypi @@ -7,34 +7,9 @@ # be found in the AUTHORS file in the root of the source tree. { - 'variables': { - 'autotest_name': 'vie_auto_test', - }, 'targets': [ { - 'target_name': 'merged_lib', - 'type': 'none', - 'dependencies': [ - '<(autotest_name)', - ], - 'actions': [ - { - 'variables': { - 'output_lib_name': 'webrtc', - 'output_lib': '<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)<(output_lib_name)_<(OS)<(STATIC_LIB_SUFFIX)', - }, - 'action_name': 'merge_libs', - 'inputs': ['<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)<(autotest_name)<(EXECUTABLE_SUFFIX)'], - 'outputs': ['<(output_lib)'], - 'action': ['python', - '../build/merge_libs.py', - '<(PRODUCT_DIR)', - '<(output_lib)'], - }, - ], - }, - { - 'target_name': '<(autotest_name)', + 'target_name': 'vie_auto_test', 'type': 'executable', 'dependencies': [ '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers', diff --git a/src/video_engine/video_engine.gyp b/src/video_engine/video_engine.gyp index c10926a1e2..88473ebd31 100644 --- a/src/video_engine/video_engine.gyp +++ b/src/video_engine/video_engine.gyp @@ -8,18 +8,18 @@ { 'includes': [ - '../common_settings.gypi', # Common settings + '../build/common.gypi', 'main/source/video_engine_core.gypi', ], - # Test targets, excluded when building with chromium. + # Test targets, excluded when building with Chromium. 'conditions': [ ['build_with_chromium==0', { 'includes': [ 'main/test/AutoTest/vie_auto_test.gypi', 'main/test/WindowsTest/windowstest.gypi', - ], # includes - }], # build_with_chromium - ], # conditions + ], + }], + ], } diff --git a/src/voice_engine/main/test/voice_engine_tests.gypi b/src/voice_engine/main/test/voice_engine_tests.gypi index 096d226312..f19cd44fd2 100644 --- a/src/voice_engine/main/test/voice_engine_tests.gypi +++ b/src/voice_engine/main/test/voice_engine_tests.gypi @@ -7,35 +7,10 @@ # be found in the AUTHORS file in the root of the source tree. { - 'variables': { - 'autotest_name': 'voe_auto_test', - }, 'targets': [ - { - 'target_name': 'merged_lib_voice', - 'type': 'none', - 'dependencies': [ - '<(autotest_name)', - ], - 'actions': [ - { - 'variables': { - 'output_lib_name': 'webrtc_voice_engine', - 'output_lib': '<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)<(output_lib_name)_<(OS)<(STATIC_LIB_SUFFIX)', - }, - 'action_name': 'merge_libs', - 'inputs': ['<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)<(autotest_name)<(EXECUTABLE_SUFFIX)'], - 'outputs': ['<(output_lib)'], - 'action': ['python', - '../build/merge_libs.py', - '<(PRODUCT_DIR)', - '<(output_lib)'], - }, - ], - }, # Auto test - command line test for all platforms { - 'target_name': '<(autotest_name)', + 'target_name': 'voe_auto_test', 'type': 'executable', 'dependencies': [ 'voice_engine_core', @@ -60,13 +35,6 @@ 'auto_test/voe_unit_test.cc', 'auto_test/voe_unit_test.h', ], - 'conditions': [ - ['OS=="win"', { - 'dependencies': [ - 'voice_engine.gyp:voe_ui_win_test', - ], - }], - ], }, { # command line test that should work on linux/mac/win diff --git a/src/voice_engine/voice_engine.gyp b/src/voice_engine/voice_engine.gyp index d235a818fc..f45a269592 100644 --- a/src/voice_engine/voice_engine.gyp +++ b/src/voice_engine/voice_engine.gyp @@ -8,16 +8,16 @@ { 'includes': [ - '../common_settings.gypi', # Common settings + '../build/common.gypi', 'main/source/voice_engine_core.gypi', ], - # Test targets, excluded when building with chromium. + # Test targets, excluded when building with Chromium. 'conditions': [ ['build_with_chromium==0', { 'includes': [ 'main/test/voice_engine_tests.gypi', - ], # includes - }], # build_with_chromium - ], # conditions + ], + }], + ], } diff --git a/webrtc.gyp b/webrtc.gyp index ee8c14e928..fe97e8fafd 100644 --- a/webrtc.gyp +++ b/webrtc.gyp @@ -20,11 +20,8 @@ #'src/common_video/common_video.gyp:*', #'src/modules/modules.gyp:*', #'src/system_wrappers/source/system_wrappers.gyp:*', - # TODO(andrew): move the merge_lib targets to a private gyp so we can - # target "*" in these. - 'src/video_engine/video_engine.gyp:vie_auto_test', - 'src/voice_engine/voice_engine.gyp:voe_auto_test', - 'src/voice_engine/voice_engine.gyp:voe_cmd_test', + 'src/video_engine/video_engine.gyp:*', + 'src/voice_engine/voice_engine.gyp:*', ], }, # TODO(andrew): move peerconnection to its own gyp.