From d191b434b2c0a01337e0078c96777fe8c58e2a65 Mon Sep 17 00:00:00 2001 From: "mikhal@webrtc.org" Date: Fri, 7 Oct 2011 20:00:23 +0000 Subject: [PATCH] Libyuv: 1. Dividing gyp file to test and source. 2. Updating DEPS file to build tests (not only library). Review URL: http://webrtc-codereview.appspot.com/210001 git-svn-id: http://libyuv.googlecode.com/svn/trunk@13 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- DEPS | 2 +- libyuv.gyp | 48 +++++++++--------------------------------------- libyuv_test.gyp | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 40 deletions(-) create mode 100644 libyuv_test.gyp diff --git a/DEPS b/DEPS index e66d8d1fc..6b763b5a8 100644 --- a/DEPS +++ b/DEPS @@ -29,6 +29,6 @@ hooks = [ # A change to a .gyp, .gypi, or to GYP itself should run the generator. { "pattern": ".", - "action": ["python", "trunk/build/gyp_chromium", "--depth=trunk", "trunk/libyuv.gyp"], + "action": ["python", "trunk/build/gyp_chromium", "--depth=trunk", "trunk/libyuv_test.gyp"], }, ] diff --git a/libyuv.gyp b/libyuv.gyp index e82931a93..3824a8008 100644 --- a/libyuv.gyp +++ b/libyuv.gyp @@ -7,20 +7,20 @@ # be found in the AUTHORS file in the root of the source tree. { - 'includes': [ - 'build/common.gypi', - ], 'targets': [ { 'target_name': 'libyuv', 'type': 'static_library', - 'dependencies': [ - ], 'include_dirs': [ - 'include', 'common', - + 'include', ], + 'direct_dependent_settings': { + 'include_dirs': [ + 'common', + 'include', + ], + }, 'sources': [ # includes 'include/convert.h', @@ -38,46 +38,16 @@ # sources 'source/convert.cc', - 'source/general.cc', - 'source/scale.cc', 'source/cpu_id.cc', 'source/format_conversion.cc', + 'source/general.cc', 'source/planar_functions.cc', 'source/row_posix.cc', 'source/row_table.cc', + 'source/scale.cc', 'source/video_common.cc', - ], }, - { - 'target_name': 'libyuvUnitTest', - 'type': 'executable', - 'dependencies': [ - 'libyuv', - # The tests are based on gtest - 'testing/gtest.gyp:gtest', - 'testing/gtest.gyp:gtest_main', - ], - 'sources': [ - - # headers - 'unit_test/unit_test.h', - - # sources - 'unit_test/unit_test.cc', - - ], # source - - 'conditions': [ - - ['OS=="linux"', { - 'cflags': [ - '-fexceptions', - ], - }], - - ], # conditions - }, ], # targets } diff --git a/libyuv_test.gyp b/libyuv_test.gyp new file mode 100644 index 000000000..b132217a9 --- /dev/null +++ b/libyuv_test.gyp @@ -0,0 +1,42 @@ +# Copyright (c) 2011 The LibYuv 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. + +{ + 'targets': [ + { + 'target_name': 'libyuv_unittest', + 'type': 'executable', + 'dependencies': [ + 'libyuv.gyp:libyuv', + # The tests are based on gtest + 'testing/gtest.gyp:gtest', + 'testing/gtest.gyp:gtest_main', + ], + 'sources': [ + # headers + 'unit_test/unit_test.h', + + # sources + 'unit_test/unit_test.cc', + ], # source + 'conditions': [ + ['OS=="linux"', { + 'cflags': [ + '-fexceptions', + ], + }], + ], # conditions + }, + ], # targets +} + +# Local Variables: +# tab-width:2 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=2 shiftwidth=2: