blob: 5a85e962b59f6c221df715730d14688c3aed7084 [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.org25b39ab2013-08-20 16:17:10 +000018 'conditions': [
19 ['OS=="win"', {
20 'gflags_gen_arch_root': '<(gflags_root)/gen/win',
21 }, {
22 'gflags_gen_arch_root': '<(gflags_root)/gen/posix',
23 }],
24 ],
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +000025 },
26 'targets': [
27 {
fischman@webrtc.orgdde7d4c2013-08-15 23:31:30 +000028 'target_name': 'gflags',
wjia@webrtc.orga3c82bf2013-01-18 23:42:21 +000029 'type': 'static_library',
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +000030 'include_dirs': [
kjellander4bba35f2016-02-09 06:47:39 -080031 '<(gflags_gen_arch_root)/include/gflags', # For configured files.
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +000032 '<(gflags_gen_arch_root)/include/private', # For config.h
kjellander4bba35f2016-02-09 06:47:39 -080033 '<(gflags_root)/src/src', # For everything else.
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +000034 ],
35 'defines': [
36 # These macros exist so flags and symbols are properly
37 # exported when building DLLs. Since we don't build DLLs, we
38 # need to disable them.
39 'GFLAGS_DLL_DECL=',
40 'GFLAGS_DLL_DECLARE_FLAG=',
41 'GFLAGS_DLL_DEFINE_FLAG=',
42 ],
43 'direct_dependent_settings': {
44 'include_dirs': [
45 '<(gflags_gen_arch_root)/include', # For configured files.
kjellander4bba35f2016-02-09 06:47:39 -080046 '<(gflags_root)/src/src', # For everything else.
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +000047 ],
48 'defines': [
49 'GFLAGS_DLL_DECL=',
50 'GFLAGS_DLL_DECLARE_FLAG=',
51 'GFLAGS_DLL_DEFINE_FLAG=',
52 ],
53 },
54 'sources': [
kjellander4bba35f2016-02-09 06:47:39 -080055 'src/src/gflags.cc',
56 'src/src/gflags_completions.cc',
57 'src/src/gflags_reporting.cc',
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +000058 ],
59 'conditions': [
andrew@webrtc.orgb9d20642012-09-19 23:08:50 +000060 ['OS=="win"', {
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +000061 'sources': [
kjellander4bba35f2016-02-09 06:47:39 -080062 'src/src/windows_port.cc',
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +000063 ],
kjellander4bba35f2016-02-09 06:47:39 -080064 'msvs_disabled_warnings': [
65 4005, # WIN32_LEAN_AND_MEAN redefinition.
66 4267, # Conversion from size_t to "type".
67 ],
68 'configurations': {
69 'Common_Base': {
70 'msvs_configuration_attributes': {
71 'CharacterSet': '2', # Use Multi-byte Character Set.
72 },
73 },
74 },
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +000075 }],
andrew@webrtc.org36d0baf2012-08-27 20:58:56 +000076 # TODO(andrew): Look into fixing this warning upstream:
77 # http://code.google.com/p/webrtc/issues/detail?id=760
Frank Barchardb608eb82015-10-28 10:59:34 -070078 ['OS=="win" and clang==1', {
79 'msvs_settings': {
80 'VCCLCompilerTool': {
Frank Barchardb608eb82015-10-28 10:59:34 -070081 'AdditionalOptions': [
kjellander4bba35f2016-02-09 06:47:39 -080082 '-Wno-microsoft-include',
Frank Barchardb608eb82015-10-28 10:59:34 -070083 ],
84 },
85 },
86 }],
andrew@webrtc.org36d0baf2012-08-27 20:58:56 +000087 ['clang==1', {
kjellander4bba35f2016-02-09 06:47:39 -080088 'cflags': [
89 '-Wno-microsoft-include',
90 ],
andrew@webrtc.org3007b262012-06-04 23:14:37 +000091 }],
kjellander@webrtc.orgecc43fd2011-09-09 13:00:24 +000092 ],
93 },
94 ],
95}