andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 1 | # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license |
| 4 | # that can be found in the LICENSE file in the root of the source |
| 5 | # tree. An additional intellectual property rights grant can be found |
| 6 | # in the file PATENTS. All contributing project authors may |
| 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
| 9 | { |
| 10 | 'variables': { |
| 11 | 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)', |
| 12 | 'conditions': [ |
| 13 | ['use_libjpeg_turbo==1', { |
| 14 | 'libjpeg_include_dir%': [ '<(DEPTH)/third_party/libjpeg_turbo', ], |
| 15 | }, { |
| 16 | 'libjpeg_include_dir%': [ '<(DEPTH)/third_party/libjpeg', ], |
| 17 | }], |
| 18 | ], |
| 19 | }, |
| 20 | 'includes': ['../build/common.gypi'], |
| 21 | 'targets': [ |
| 22 | { |
| 23 | 'target_name': 'common_video', |
| 24 | 'type': 'static_library', |
| 25 | 'include_dirs': [ |
| 26 | '<(webrtc_root)/modules/interface/', |
| 27 | 'interface', |
| 28 | 'jpeg/include', |
| 29 | 'libyuv/include', |
| 30 | ], |
mikhal@webrtc.org | 3bbed74 | 2012-10-24 18:33:04 +0000 | [diff] [blame] | 31 | 'dependencies': [ |
| 32 | '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers', |
| 33 | ], |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 34 | 'direct_dependent_settings': { |
| 35 | 'include_dirs': [ |
| 36 | 'interface', |
| 37 | 'jpeg/include', |
| 38 | 'libyuv/include', |
| 39 | ], |
| 40 | }, |
| 41 | 'conditions': [ |
| 42 | ['build_libjpeg==1', { |
| 43 | 'dependencies': ['<(libjpeg_gyp_path):libjpeg',], |
| 44 | }, { |
| 45 | # Need to add a directory normally exported by libjpeg.gyp. |
| 46 | 'include_dirs': ['<(libjpeg_include_dir)'], |
| 47 | }], |
| 48 | ['build_libyuv==1', { |
| 49 | 'dependencies': ['<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv',], |
| 50 | }, { |
| 51 | # Need to add a directory normally exported by libyuv.gyp. |
| 52 | 'include_dirs': ['<(libyuv_dir)/include',], |
| 53 | }], |
| 54 | ], |
| 55 | 'sources': [ |
| 56 | 'interface/i420_video_frame.h', |
wuchengli@chromium.org | c5e70b0 | 2013-08-13 05:53:38 +0000 | [diff] [blame] | 57 | 'interface/native_handle.h', |
wu@webrtc.org | ea7b33e | 2013-08-05 20:36:57 +0000 | [diff] [blame] | 58 | 'interface/texture_video_frame.h', |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 59 | 'i420_video_frame.cc', |
| 60 | 'jpeg/include/jpeg.h', |
| 61 | 'jpeg/data_manager.cc', |
| 62 | 'jpeg/data_manager.h', |
| 63 | 'jpeg/jpeg.cc', |
| 64 | 'libyuv/include/webrtc_libyuv.h', |
| 65 | 'libyuv/include/scaler.h', |
| 66 | 'libyuv/webrtc_libyuv.cc', |
| 67 | 'libyuv/scaler.cc', |
| 68 | 'plane.h', |
| 69 | 'plane.cc', |
wu@webrtc.org | ea7b33e | 2013-08-05 20:36:57 +0000 | [diff] [blame] | 70 | 'texture_video_frame.cc' |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 71 | ], |
andrew@webrtc.org | 2be6c3e | 2013-01-29 06:45:22 +0000 | [diff] [blame] | 72 | # Silence jpeg struct padding warnings. |
| 73 | 'msvs_disabled_warnings': [ 4324, ], |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 74 | }, |
| 75 | ], # targets |
| 76 | 'conditions': [ |
| 77 | ['include_tests==1', { |
| 78 | 'targets': [ |
| 79 | { |
| 80 | 'target_name': 'common_video_unittests', |
henrike@webrtc.org | acb00f5 | 2013-08-02 16:53:47 +0000 | [diff] [blame] | 81 | 'type': '<(gtest_target_type)', |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 82 | 'dependencies': [ |
| 83 | 'common_video', |
| 84 | '<(DEPTH)/testing/gtest.gyp:gtest', |
| 85 | '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers', |
| 86 | '<(webrtc_root)/test/test.gyp:test_support_main', |
| 87 | ], |
| 88 | 'sources': [ |
| 89 | 'i420_video_frame_unittest.cc', |
| 90 | 'jpeg/jpeg_unittest.cc', |
| 91 | 'libyuv/libyuv_unittest.cc', |
| 92 | 'libyuv/scaler_unittest.cc', |
| 93 | 'plane_unittest.cc', |
wu@webrtc.org | ea7b33e | 2013-08-05 20:36:57 +0000 | [diff] [blame] | 94 | 'texture_video_frame_unittest.cc' |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 95 | ], |
kjellander@webrtc.org | 1e7f77a | 2013-02-04 10:07:17 +0000 | [diff] [blame] | 96 | # Disable warnings to enable Win64 build, issue 1323. |
| 97 | 'msvs_disabled_warnings': [ |
| 98 | 4267, # size_t to int truncation. |
| 99 | ], |
henrike@webrtc.org | acb00f5 | 2013-08-02 16:53:47 +0000 | [diff] [blame] | 100 | 'conditions': [ |
| 101 | # TODO(henrike): remove build_with_chromium==1 when the bots are |
| 102 | # using Chromium's buildbots. |
| 103 | ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', { |
| 104 | 'dependencies': [ |
| 105 | '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code', |
| 106 | ], |
| 107 | }], |
| 108 | ], |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 109 | }, |
| 110 | ], # targets |
henrike@webrtc.org | acb00f5 | 2013-08-02 16:53:47 +0000 | [diff] [blame] | 111 | 'conditions': [ |
| 112 | # TODO(henrike): remove build_with_chromium==1 when the bots are using |
| 113 | # Chromium's buildbots. |
| 114 | ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', { |
| 115 | 'targets': [ |
| 116 | { |
| 117 | 'target_name': 'common_video_unittests_apk_target', |
| 118 | 'type': 'none', |
| 119 | 'dependencies': [ |
| 120 | '<(apk_tests_path):common_video_unittests_apk', |
| 121 | ], |
| 122 | }, |
| 123 | ], |
| 124 | }], |
kjellander@webrtc.org | 3540c82 | 2013-08-22 07:57:00 +0000 | [diff] [blame^] | 125 | ['test_isolation_mode != "noop"', { |
| 126 | 'targets': [ |
| 127 | { |
| 128 | 'target_name': 'common_video_unittests_run', |
| 129 | 'type': 'none', |
| 130 | 'dependencies': [ |
| 131 | '<(import_isolate_path):import_isolate_gypi', |
| 132 | 'common_video_unittests', |
| 133 | ], |
| 134 | 'includes': [ |
| 135 | 'common_video_unittests.isolate', |
| 136 | ], |
| 137 | 'sources': [ |
| 138 | 'common_video_unittests.isolate', |
| 139 | ], |
| 140 | }, |
| 141 | ], |
| 142 | }], |
henrike@webrtc.org | acb00f5 | 2013-08-02 16:53:47 +0000 | [diff] [blame] | 143 | ], |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 144 | }], # include_tests |
| 145 | ], |
henrike@webrtc.org | acb00f5 | 2013-08-02 16:53:47 +0000 | [diff] [blame] | 146 | } |