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 }