kjellander@webrtc.org | ecc43fd | 2011-09-09 13:00:24 +0000 | [diff] [blame] | 1 | # 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.org | dde7d4c | 2013-08-15 23:31:30 +0000 | [diff] [blame] | 17 | 'gflags_root': '<(DEPTH)/third_party/gflags', |
kjellander@webrtc.org | 25b39ab | 2013-08-20 16:17:10 +0000 | [diff] [blame] | 18 | '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.org | ecc43fd | 2011-09-09 13:00:24 +0000 | [diff] [blame] | 25 | }, |
| 26 | 'targets': [ |
| 27 | { |
fischman@webrtc.org | dde7d4c | 2013-08-15 23:31:30 +0000 | [diff] [blame] | 28 | 'target_name': 'gflags', |
wjia@webrtc.org | a3c82bf | 2013-01-18 23:42:21 +0000 | [diff] [blame] | 29 | 'type': 'static_library', |
kjellander@webrtc.org | ecc43fd | 2011-09-09 13:00:24 +0000 | [diff] [blame] | 30 | 'include_dirs': [ |
kjellander | 4bba35f | 2016-02-09 06:47:39 -0800 | [diff] [blame] | 31 | '<(gflags_gen_arch_root)/include/gflags', # For configured files. |
kjellander@webrtc.org | ecc43fd | 2011-09-09 13:00:24 +0000 | [diff] [blame] | 32 | '<(gflags_gen_arch_root)/include/private', # For config.h |
kjellander | 4bba35f | 2016-02-09 06:47:39 -0800 | [diff] [blame] | 33 | '<(gflags_root)/src/src', # For everything else. |
kjellander@webrtc.org | ecc43fd | 2011-09-09 13:00:24 +0000 | [diff] [blame] | 34 | ], |
| 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. |
kjellander | 4bba35f | 2016-02-09 06:47:39 -0800 | [diff] [blame] | 46 | '<(gflags_root)/src/src', # For everything else. |
kjellander@webrtc.org | ecc43fd | 2011-09-09 13:00:24 +0000 | [diff] [blame] | 47 | ], |
| 48 | 'defines': [ |
| 49 | 'GFLAGS_DLL_DECL=', |
| 50 | 'GFLAGS_DLL_DECLARE_FLAG=', |
| 51 | 'GFLAGS_DLL_DEFINE_FLAG=', |
| 52 | ], |
| 53 | }, |
| 54 | 'sources': [ |
kjellander | 4bba35f | 2016-02-09 06:47:39 -0800 | [diff] [blame] | 55 | 'src/src/gflags.cc', |
| 56 | 'src/src/gflags_completions.cc', |
| 57 | 'src/src/gflags_reporting.cc', |
kjellander@webrtc.org | ecc43fd | 2011-09-09 13:00:24 +0000 | [diff] [blame] | 58 | ], |
| 59 | 'conditions': [ |
andrew@webrtc.org | b9d2064 | 2012-09-19 23:08:50 +0000 | [diff] [blame] | 60 | ['OS=="win"', { |
kjellander@webrtc.org | ecc43fd | 2011-09-09 13:00:24 +0000 | [diff] [blame] | 61 | 'sources': [ |
kjellander | 4bba35f | 2016-02-09 06:47:39 -0800 | [diff] [blame] | 62 | 'src/src/windows_port.cc', |
kjellander@webrtc.org | ecc43fd | 2011-09-09 13:00:24 +0000 | [diff] [blame] | 63 | ], |
kjellander | 4bba35f | 2016-02-09 06:47:39 -0800 | [diff] [blame] | 64 | '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.org | ecc43fd | 2011-09-09 13:00:24 +0000 | [diff] [blame] | 75 | }], |
andrew@webrtc.org | 36d0baf | 2012-08-27 20:58:56 +0000 | [diff] [blame] | 76 | # TODO(andrew): Look into fixing this warning upstream: |
| 77 | # http://code.google.com/p/webrtc/issues/detail?id=760 |
Frank Barchard | b608eb8 | 2015-10-28 10:59:34 -0700 | [diff] [blame] | 78 | ['OS=="win" and clang==1', { |
| 79 | 'msvs_settings': { |
| 80 | 'VCCLCompilerTool': { |
Frank Barchard | b608eb8 | 2015-10-28 10:59:34 -0700 | [diff] [blame] | 81 | 'AdditionalOptions': [ |
kjellander | 4bba35f | 2016-02-09 06:47:39 -0800 | [diff] [blame] | 82 | '-Wno-microsoft-include', |
Frank Barchard | b608eb8 | 2015-10-28 10:59:34 -0700 | [diff] [blame] | 83 | ], |
| 84 | }, |
| 85 | }, |
| 86 | }], |
andrew@webrtc.org | 36d0baf | 2012-08-27 20:58:56 +0000 | [diff] [blame] | 87 | ['clang==1', { |
kjellander | 4bba35f | 2016-02-09 06:47:39 -0800 | [diff] [blame] | 88 | 'cflags': [ |
| 89 | '-Wno-microsoft-include', |
| 90 | ], |
andrew@webrtc.org | 3007b26 | 2012-06-04 23:14:37 +0000 | [diff] [blame] | 91 | }], |
kjellander@webrtc.org | ecc43fd | 2011-09-09 13:00:24 +0000 | [diff] [blame] | 92 | ], |
| 93 | }, |
| 94 | ], |
| 95 | } |