OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'chromium_code': 1, | 7 'chromium_code': 1, |
8 }, | 8 }, |
9 'targets': [ | 9 'targets': [ |
10 { | 10 { |
11 'target_name': 'sdch', | 11 'target_name': 'sdch', |
12 'type': 'static_library', | 12 'type': 'static_library', |
13 'dependencies': [ | 13 'dependencies': [ |
14 '../third_party/zlib/zlib.gyp:zlib', | 14 '../third_party/zlib/zlib.gyp:zlib', |
15 ], | 15 ], |
16 'sources': [ | 16 'sources': [ |
17 'logging_forward.h', | |
17 'open-vcdiff/src/addrcache.cc', | 18 'open-vcdiff/src/addrcache.cc', |
18 'open-vcdiff/src/blockhash.cc', | 19 'open-vcdiff/src/blockhash.cc', |
19 'open-vcdiff/src/blockhash.h', | 20 'open-vcdiff/src/blockhash.h', |
20 'open-vcdiff/src/checksum.h', | 21 'open-vcdiff/src/checksum.h', |
21 'open-vcdiff/src/codetable.cc', | 22 'open-vcdiff/src/codetable.cc', |
22 'open-vcdiff/src/codetable.h', | 23 'open-vcdiff/src/codetable.h', |
23 'open-vcdiff/src/compile_assert.h', | 24 'open-vcdiff/src/compile_assert.h', |
24 'open-vcdiff/src/decodetable.cc', | 25 'open-vcdiff/src/decodetable.cc', |
25 'open-vcdiff/src/decodetable.h', | 26 'open-vcdiff/src/decodetable.h', |
26 'open-vcdiff/src/encodetable.cc', | 27 'open-vcdiff/src/encodetable.cc', |
27 'open-vcdiff/src/encodetable.h', | 28 'open-vcdiff/src/encodetable.h', |
28 'open-vcdiff/src/google/output_string.h', | 29 'open-vcdiff/src/google/output_string.h', |
29 'open-vcdiff/src/google/vcdecoder.h', | 30 'open-vcdiff/src/google/vcdecoder.h', |
30 'open-vcdiff/src/headerparser.cc', | 31 'open-vcdiff/src/headerparser.cc', |
31 'open-vcdiff/src/headerparser.h', | 32 'open-vcdiff/src/headerparser.h', |
32 'open-vcdiff/src/instruction_map.cc', | 33 'open-vcdiff/src/instruction_map.cc', |
33 'open-vcdiff/src/instruction_map.h', | 34 'open-vcdiff/src/instruction_map.h', |
34 'open-vcdiff/src/logging.cc', | |
35 'open-vcdiff/src/logging.h', | |
wtc
2013/11/12 02:17:39
Please confirm that you don't want to remove these
wtc
2013/11/12 02:19:30
Please ignore this question. I found the answer in
| |
36 'open-vcdiff/src/rolling_hash.h', | 35 'open-vcdiff/src/rolling_hash.h', |
37 'open-vcdiff/src/testing.h', | 36 'open-vcdiff/src/testing.h', |
38 'open-vcdiff/src/varint_bigendian.cc', | 37 'open-vcdiff/src/varint_bigendian.cc', |
39 'open-vcdiff/src/varint_bigendian.h', | 38 'open-vcdiff/src/varint_bigendian.h', |
40 'open-vcdiff/src/vcdecoder.cc', | 39 'open-vcdiff/src/vcdecoder.cc', |
41 'open-vcdiff/src/vcdiff_defs.h', | 40 'open-vcdiff/src/vcdiff_defs.h', |
42 'open-vcdiff/src/vcdiffengine.cc', | 41 'open-vcdiff/src/vcdiffengine.cc', |
43 'open-vcdiff/src/vcdiffengine.h', | 42 'open-vcdiff/src/vcdiffengine.h', |
44 'open-vcdiff/vsprojects/config.h', | 43 'open-vcdiff/vsprojects/config.h', |
45 'open-vcdiff/vsprojects/stdint.h', | 44 'open-vcdiff/vsprojects/stdint.h', |
46 ], | 45 ], |
47 'include_dirs': [ | 46 'include_dirs': [ |
48 'open-vcdiff/src', | 47 'open-vcdiff/src', |
48 '..', | |
wtc
2013/11/12 02:17:39
Is this pointing to the src/sdch directory? Why is
Nico
2013/11/12 03:34:10
It's pointing to src/, so that the include of "bas
wtc
2013/11/12 18:14:03
Thank you. This was not obvious to me, so it might
Nico
2013/11/12 18:34:42
Makes sense, done.
| |
49 ], | 49 ], |
50 'direct_dependent_settings': { | 50 'direct_dependent_settings': { |
51 'include_dirs': [ | 51 'include_dirs': [ |
52 'open-vcdiff/src', | 52 'open-vcdiff/src', |
53 ], | 53 ], |
54 }, | 54 }, |
55 'conditions': [ | 55 'conditions': [ |
56 [ 'OS == "linux" or OS == "android"', { 'include_dirs': [ 'linux' ] } ], | 56 [ 'OS == "linux" or OS == "android"', { 'include_dirs': [ 'linux' ] } ], |
57 [ 'os_bsd==1 or OS=="solaris"', { 'include_dirs': [ 'bsd' ] } ], | 57 [ 'os_bsd==1 or OS=="solaris"', { 'include_dirs': [ 'bsd' ] } ], |
58 [ 'OS == "ios"', { 'include_dirs': [ 'ios' ] } ], | 58 [ 'OS == "ios"', { 'include_dirs': [ 'ios' ] } ], |
59 [ 'OS == "mac"', { 'include_dirs': [ 'mac' ] } ], | 59 [ 'OS == "mac"', { 'include_dirs': [ 'mac' ] } ], |
60 [ 'OS == "win"', { 'include_dirs': [ 'open-vcdiff/vsprojects' ] } ], | 60 [ 'OS == "win"', { 'include_dirs': [ 'open-vcdiff/vsprojects' ] } ], |
61 ], | 61 ], |
62 # open-vcdiff's logging.h introduces static initializers. This was | |
63 # reported upstream years ago ( | |
64 # https://code.google.com/p/open-vcdiff/issues/detail?id=33 ). Since | |
65 # upstream won't fix this, work around it on the chromium side: Define | |
66 # the header guard so that open-vcdiff's logging.h doesn't get used, and | |
67 # inject a header that forwards to base/logging.h instead (which doesn't | |
68 # introduce static initializers). | |
69 'defines': [ | |
70 'OPEN_VCDIFF_LOGGING_H_', | |
wtc
2013/11/12 02:17:39
Why don't we define this macro in logging_forward.
Nico
2013/11/12 03:34:10
That works too. I put it here so that it's next to
| |
71 ], | |
72 'variables': { | |
73 'logging_path': 'logging_forward.h', | |
74 'conditions': [ | |
75 # gyp leaves unspecified what the cwd is when running the compiler, | |
76 # and gyp/linux doesn't have a built-in way for forcing an include. | |
77 # So hardcode the base directory. If this spreads, provide native | |
78 # support in gyp, like we have for gyp/mac and gyp/windows. | |
79 # path. | |
80 ['"<(GENERATOR)"=="ninja"', { 'logging_dir': '../..' }, | |
81 { 'logging_dir': '.' } | |
82 ], | |
83 ], | |
84 }, | |
85 # GCC_PREFIX_HEADER is relative to the current directory, | |
86 # ForcedIncludeFiles is relative to include_dirs, cflags relative to the | |
87 # build directory. | |
88 'xcode_settings': { 'GCC_PREFIX_HEADER': '<(logging_path)' }, | |
89 'msvs_settings': { | |
90 'VCCLCompilerTool': { 'ForcedIncludeFiles': [ 'sdch/<(logging_path)' ] } | |
91 }, | |
92 'cflags': [ '-include', '<(logging_dir)/sdch/<(logging_path)' ], | |
62 }, | 93 }, |
63 ], | 94 ], |
64 } | 95 } |
OLD | NEW |