blob: 647942fef46273521dd97199bdd95ac51d895b30 [file] [log] [blame]
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +00001# Copyright 2011 Google Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15{
16 'variables': {
fischman@webrtc.orgdde7d4c2013-08-15 23:31:30 +000017 'gflags_root': '<(DEPTH)/third_party/gflags',
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +000018 'gflags_gen_arch_root': '<(gflags_root)/gen/arch/<(OS)/<(target_arch)',
19 },
20 'targets': [
21 {
fischman@webrtc.orgdde7d4c2013-08-15 23:31:30 +000022 'target_name': 'gflags',
wjia@webrtc.orga3c82bf2013-01-18 23:42:21 +000023 'type': 'static_library',
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +000024 'include_dirs': [
25 '<(gflags_gen_arch_root)/include/private', # For config.h
26 '<(gflags_gen_arch_root)/include', # For configured files.
27 '<(gflags_root)/src', # For everything else.
28 ],
29 'defines': [
30 # These macros exist so flags and symbols are properly
31 # exported when building DLLs. Since we don't build DLLs, we
32 # need to disable them.
33 'GFLAGS_DLL_DECL=',
34 'GFLAGS_DLL_DECLARE_FLAG=',
35 'GFLAGS_DLL_DEFINE_FLAG=',
36 ],
37 'direct_dependent_settings': {
38 'include_dirs': [
39 '<(gflags_gen_arch_root)/include', # For configured files.
40 '<(gflags_root)/src', # For everything else.
41 ],
42 'defines': [
43 'GFLAGS_DLL_DECL=',
44 'GFLAGS_DLL_DECLARE_FLAG=',
45 'GFLAGS_DLL_DEFINE_FLAG=',
46 ],
47 },
48 'sources': [
49 'src/gflags.cc',
50 'src/gflags_completions.cc',
51 'src/gflags_reporting.cc',
52 ],
53 'conditions': [
andrew@webrtc.orgb9d20642012-09-19 23:08:50 +000054 ['OS=="win"', {
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +000055 'sources': [
56 'src/windows/port.cc',
57 ],
fischman@webrtc.orgdde7d4c2013-08-15 23:31:30 +000058 # Suppress warnings about WIN32_LEAN_AND_MEAN and size_t truncation.
59 'msvs_disabled_warnings': [4005, 4267],
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +000060 }],
andrew@webrtc.org36d0baf2012-08-27 20:58:56 +000061 # TODO(andrew): Look into fixing this warning upstream:
62 # http://code.google.com/p/webrtc/issues/detail?id=760
63 ['clang==1', {
64 'cflags!': ['-Wheader-hygiene',],
andrew@webrtc.org3007b262012-06-04 23:14:37 +000065 'xcode_settings': {
andrew@webrtc.org36d0baf2012-08-27 20:58:56 +000066 'WARNING_CFLAGS!': ['-Wheader-hygiene',],
andrew@webrtc.org3007b262012-06-04 23:14:37 +000067 },
68 }],
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +000069 ],
70 },
71 ],
72}