From 8919cfe9ce84a7d803a69a2b05e871c145bfa40b Mon Sep 17 00:00:00 2001 From: "fdegans@chromium.org" Date: Fri, 23 Jan 2015 16:35:17 +0000 Subject: [PATCH] Change a GYP reference to cpufeatures.gypi This will allow us to move the remaining GYP file in android_tools to the chromium repository by removing the direct reference to it. BUG=webrtc:4115 R=andrew@webrtc.org, kjellander@webrtc.org Review URL: https://webrtc-codereview.appspot.com/35849004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@8140 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../system_wrappers/cpu_features_chromium.gyp | 26 ++++++++++++++ .../system_wrappers/cpu_features_webrtc.gyp | 26 ++++++++++++++ webrtc/system_wrappers/system_wrappers.gyp | 36 ++++++------------- 3 files changed, 63 insertions(+), 25 deletions(-) create mode 100644 webrtc/system_wrappers/cpu_features_chromium.gyp create mode 100644 webrtc/system_wrappers/cpu_features_webrtc.gyp diff --git a/webrtc/system_wrappers/cpu_features_chromium.gyp b/webrtc/system_wrappers/cpu_features_chromium.gyp new file mode 100644 index 0000000000..96bb6d9c60 --- /dev/null +++ b/webrtc/system_wrappers/cpu_features_chromium.gyp @@ -0,0 +1,26 @@ +# Copyright (c) 2014 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. + +{ + 'conditions': [ + ['OS=="android"', { + 'targets': [ + { + 'target_name': 'cpu_features_android', + 'type': 'static_library', + 'sources': [ + 'source/cpu_features_android.c', + ], + 'includes': [ + '../../../build/android/cpufeatures.gypi', + ], + }, + ], + }], + ], # conditions +} diff --git a/webrtc/system_wrappers/cpu_features_webrtc.gyp b/webrtc/system_wrappers/cpu_features_webrtc.gyp new file mode 100644 index 0000000000..c7ce4dc51b --- /dev/null +++ b/webrtc/system_wrappers/cpu_features_webrtc.gyp @@ -0,0 +1,26 @@ +# Copyright (c) 2014 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. + +{ + 'conditions': [ + ['OS=="android"', { + 'targets': [ + { + 'target_name': 'cpu_features_android', + 'type': 'static_library', + 'sources': [ + 'source/cpu_features_android.c', + ], + 'includes': [ + '../../build/android/cpufeatures.gypi', + ], + }, + ], + }], + ], # conditions +} diff --git a/webrtc/system_wrappers/system_wrappers.gyp b/webrtc/system_wrappers/system_wrappers.gyp index 221305b624..3af8897875 100644 --- a/webrtc/system_wrappers/system_wrappers.gyp +++ b/webrtc/system_wrappers/system_wrappers.gyp @@ -124,7 +124,17 @@ # with condition and event functions in system_wrappers. 'WEBRTC_CLOCK_TYPE_REALTIME', ], - 'dependencies': [ 'cpu_features_android', ], + 'conditions': [ + ['build_with_chromium==1', { + 'dependencies': [ + 'cpu_features_chromium.gyp:cpu_features_android', + ], + }, { + 'dependencies': [ + 'cpu_features_webrtc.gyp:cpu_features_android', + ], + }], + ], 'link_settings': { 'libraries': [ '-llog', @@ -213,29 +223,5 @@ ] }, ], # targets - 'conditions': [ - ['OS=="android"', { - 'targets': [ - { - 'target_name': 'cpu_features_android', - 'type': 'static_library', - 'sources': [ - 'source/cpu_features_android.c', - ], - 'conditions': [ - ['android_webview_build == 1', { - 'libraries': [ - 'cpufeatures.a' - ], - }, { - 'dependencies': [ - '<(android_ndk_root)/android_tools_ndk.gyp:cpu_features', - ], - }], - ], - }, - ], - }], - ], # conditions }