|
1 | 1 | { |
2 | 2 | "targets": [ |
3 | 3 | { |
4 | | - "target_name": "nbs_decoder", |
| 4 | + "target_name": "nbsdecoder", |
5 | 5 | "sources": [ |
6 | 6 | "src/binding.cpp", |
7 | 7 | "src/Decoder.cpp", |
8 | 8 | "src/Encoder.cpp", |
9 | 9 | "src/Hash.cpp", |
10 | 10 | "src/Packet.cpp", |
11 | 11 | "src/Timestamp.cpp", |
12 | | - "src/xxhash/xxhash.c", |
| 12 | + "src/third-party/xxhash/xxhash.c", |
13 | 13 | ], |
14 | 14 | "cflags": [], |
15 | 15 | "include_dirs": [ |
|
62 | 62 | [ |
63 | 63 | 'OS=="win"', |
64 | 64 | { |
| 65 | + "dependencies": ["zlib"], |
| 66 | + "include_dirs": [ |
| 67 | + "src/third-party/zlib", |
| 68 | + ], |
65 | 69 | "defines": ["_HAS_EXCEPTIONS=1", "NOMINMAX=1"], |
66 | 70 | "msvs_settings": { |
67 | 71 | "VCCLCompilerTool": { |
|
71 | 75 | }, |
72 | 76 | ], |
73 | 77 | ], |
74 | | - } |
75 | | - ] |
| 78 | + }, |
| 79 | + ], |
| 80 | + "conditions": [ |
| 81 | + ['OS == "win"', { |
| 82 | + "targets": [ |
| 83 | + # Compile zlib for linking on Windows only |
| 84 | + { |
| 85 | + "target_name": "zlib", |
| 86 | + "type": "static_library", |
| 87 | + "dependencies": [], |
| 88 | + "sources": [ |
| 89 | + "src/third-party/zlib/adler32.c", |
| 90 | + "src/third-party/zlib/compress.c", |
| 91 | + "src/third-party/zlib/crc32.c", |
| 92 | + "src/third-party/zlib/deflate.c", |
| 93 | + "src/third-party/zlib/gzclose.c", |
| 94 | + "src/third-party/zlib/gzlib.c", |
| 95 | + "src/third-party/zlib/gzread.c", |
| 96 | + "src/third-party/zlib/gzwrite.c", |
| 97 | + "src/third-party/zlib/infback.c", |
| 98 | + "src/third-party/zlib/inffast.c", |
| 99 | + "src/third-party/zlib/inflate.c", |
| 100 | + "src/third-party/zlib/inftrees.c", |
| 101 | + "src/third-party/zlib/trees.c", |
| 102 | + "src/third-party/zlib/uncompr.c", |
| 103 | + "src/third-party/zlib/zutil.c", |
| 104 | + ], |
| 105 | + }, |
| 106 | + ], |
| 107 | + }], |
| 108 | + ], |
76 | 109 | } |
0 commit comments