Move merge_libs targets to their own gyp.

The main reason is to depend on all ("*") targets in voice_engine.gyp and video_engine.gyp. We don't want the merge_lib targets building by default, since they do funny stuff like delete some libraries.
Review URL: http://webrtc-codereview.appspot.com/191003

git-svn-id: http://webrtc.googlecode.com/svn/trunk@699 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org 2011-10-06 01:03:18 +00:00
parent af57de006a
commit 3ce62fcfe4
6 changed files with 79 additions and 74 deletions

65
src/build/merge_libs.gyp Normal file
View File

@ -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)'],
},
],
},
],
}

View File

@ -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',

View File

@ -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
],
}],
],
}

View File

@ -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

View File

@ -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
],
}],
],
}

View File

@ -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.