webrtc/third_party/gflags/BUILD.gn
kjellander@webrtc.org b8caf6a504 GN: Enable libvpx, add link target and convert some test targets
Libvpx now supports GN and this CL turns on compiling it.
I also introduced an executable target 'webrtc_tests'
that depends on all in WeBRTC + tests in order to get a full
linking step executed (since we've seen link problems for GN
when rolling WebRTC into Chromium).

I also converted a few test targets and made a GN file for
third_party/gflags.

BUG=3441
TESTED=Trybots + full Chromium build with a symlinked src/third_party/webrtc
dir to a workspace wit this CL applied.

R=brettw@chromium.org
TBR=niklas.enbom@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/25569004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7344 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 18:05:02 +00:00

60 lines
1.6 KiB
Plaintext

# 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.
if (is_win) {
gflags_gen_arch_root = "gen/win"
} else {
gflags_gen_arch_root = "gen/posix"
}
config("gflags_config") {
include_dirs = [
"$gflags_gen_arch_root/include", # For configured files.
"src", # For everything else.
]
defines = [
# These macros exist so flags and symbols are properly exported when
# building DLLs. Since we don't build DLLs, we need to disable them.
"GFLAGS_DLL_DECL=",
"GFLAGS_DLL_DECLARE_FLAG=",
"GFLAGS_DLL_DEFINE_FLAG=",
]
}
source_set("gflags") {
sources = [
"src/gflags.cc",
"src/gflags_completions.cc",
"src/gflags_reporting.cc",
]
if (is_win) {
sources += [ "src/windows/port.cc" ]
cflags = [
"/wd4005", # WIN32_LEAN_AND_MEAN.
"/wd4267", # Conversion from size_t to "type".
]
}
include_dirs = [
"$gflags_gen_arch_root/include/private", # For config.h
]
public_configs = [ ":gflags_config" ]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
if (is_clang) {
# TODO(andrew): Look into fixing this warning upstream:
# http://code.google.com/p/webrtc/issues/detail?id=760
configs -= [ "//build/config/clang:extra_warnings" ]
}
}