• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright 2014 The LibYuv Project Authors. All rights reserved.
3#
4# Use of this source code is governed by a BSD-style license
5# that can be found in the LICENSE file in the root of the source
6# tree. An additional intellectual property rights grant can be found
7# in the file PATENTS. All contributing project authors may
8# be found in the AUTHORS file in the root of the source tree.
9
10# This is a copy of WebRTC's gflags.gyp.
11
12{
13  'variables': {
14    'gflags_root': '<(DEPTH)/third_party/gflags',
15    'conditions': [
16      ['OS=="win"', {
17        'gflags_gen_arch_root': '<(gflags_root)/gen/win',
18      }, {
19        'gflags_gen_arch_root': '<(gflags_root)/gen/posix',
20      }],
21    ],
22  },
23  'targets': [
24    {
25      'target_name': 'gflags',
26      'type': 'static_library',
27      'include_dirs': [
28        '<(gflags_gen_arch_root)/include/gflags',  # For configured files.
29        '<(gflags_gen_arch_root)/include/private',  # For config.h
30        '<(gflags_root)/src/src',  # For everything else.
31      ],
32      'defines': [
33        # These macros exist so flags and symbols are properly
34        # exported when building DLLs. Since we don't build DLLs, we
35        # need to disable them.
36        'GFLAGS_DLL_DECL=',
37        'GFLAGS_DLL_DECLARE_FLAG=',
38        'GFLAGS_DLL_DEFINE_FLAG=',
39      ],
40      'direct_dependent_settings': {
41        'include_dirs': [
42          '<(gflags_gen_arch_root)/include',  # For configured files.
43          '<(gflags_root)/src/src',  # For everything else.
44        ],
45        'defines': [
46          'GFLAGS_DLL_DECL=',
47          'GFLAGS_DLL_DECLARE_FLAG=',
48          'GFLAGS_DLL_DEFINE_FLAG=',
49        ],
50      },
51      'sources': [
52        'src/src/gflags.cc',
53        'src/src/gflags_completions.cc',
54        'src/src/gflags_reporting.cc',
55      ],
56      'conditions': [
57        ['OS=="win"', {
58          'sources': [
59            'src/src/windows_port.cc',
60          ],
61          'msvs_disabled_warnings': [
62            4005,  # WIN32_LEAN_AND_MEAN redefinition.
63            4267,  # Conversion from size_t to "type".
64          ],
65          'configurations': {
66            'Common_Base': {
67              'msvs_configuration_attributes': {
68                'CharacterSet': '2',  # Use Multi-byte Character Set.
69              },
70            },
71          },
72        }],
73        # TODO(andrew): Look into fixing this warning upstream:
74        # http://code.google.com/p/webrtc/issues/detail?id=760
75        ['OS=="win" and clang==1', {
76          'msvs_settings': {
77            'VCCLCompilerTool': {
78              'AdditionalOptions': [
79                '-Wno-microsoft-include',
80              ],
81            },
82          },
83        }],
84        ['clang==1', {
85          'cflags': [
86            '-Wno-microsoft-include',
87          ],
88        }],
89      ],
90    },
91  ],
92}
93