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': [ |
| 31 | '<(gflags_gen_arch_root)/include/private', # For config.h |
| 32 | '<(gflags_gen_arch_root)/include', # For configured files. |
| 33 | '<(gflags_root)/src', # For everything else. |
| 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. |
| 46 | '<(gflags_root)/src', # For everything else. |
| 47 | ], |
| 48 | 'defines': [ |
| 49 | 'GFLAGS_DLL_DECL=', |
| 50 | 'GFLAGS_DLL_DECLARE_FLAG=', |
| 51 | 'GFLAGS_DLL_DEFINE_FLAG=', |
| 52 | ], |
| 53 | }, |
| 54 | 'sources': [ |
| 55 | 'src/gflags.cc', |
| 56 | 'src/gflags_completions.cc', |
| 57 | 'src/gflags_reporting.cc', |
| 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': [ |
| 62 | 'src/windows/port.cc', |
| 63 | ], |
fischman@webrtc.org | dde7d4c | 2013-08-15 23:31:30 +0000 | [diff] [blame] | 64 | # Suppress warnings about WIN32_LEAN_AND_MEAN and size_t truncation. |
| 65 | 'msvs_disabled_warnings': [4005, 4267], |
kjellander@webrtc.org | ecc43fd | 2011-09-09 13:00:24 +0000 | [diff] [blame] | 66 | }], |
andrew@webrtc.org | 36d0baf | 2012-08-27 20:58:56 +0000 | [diff] [blame] | 67 | # TODO(andrew): Look into fixing this warning upstream: |
| 68 | # http://code.google.com/p/webrtc/issues/detail?id=760 |
| 69 | ['clang==1', { |
| 70 | 'cflags!': ['-Wheader-hygiene',], |
andrew@webrtc.org | 3007b26 | 2012-06-04 23:14:37 +0000 | [diff] [blame] | 71 | 'xcode_settings': { |
andrew@webrtc.org | 36d0baf | 2012-08-27 20:58:56 +0000 | [diff] [blame] | 72 | 'WARNING_CFLAGS!': ['-Wheader-hygiene',], |
andrew@webrtc.org | 3007b26 | 2012-06-04 23:14:37 +0000 | [diff] [blame] | 73 | }, |
| 74 | }], |
kjellander@webrtc.org | ecc43fd | 2011-09-09 13:00:24 +0000 | [diff] [blame] | 75 | ], |
| 76 | }, |
| 77 | ], |
| 78 | } |