summaryrefslogtreecommitdiff
path: root/test/test.gyp
blob: c6bf4d7520fc866af302012d966919b6cfcd47e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{
  'includes': [
    '../gyp/common.gypi',
  ],
  'targets': [
    { 'target_name': 'symlink_TEST_DATA',
      'type': 'none',
      'hard_dependency': 1,
      'actions': [
        {
          'action_name': 'Symlink Fixture Directory',
          'inputs': ['<!@(pwd)'],
          'outputs': ['<(PRODUCT_DIR)/TEST_DATA'], # symlinks the test dir into TEST_DATA
          'action': ['ln', '-s', '-f', '-n', '<@(_inputs)', '<@(_outputs)' ],
        }
      ],
    },
    { 'target_name': 'test',
      'type': 'executable',
      'include_dirs': [ '../include', '../src' ],
      'dependencies': [
        'symlink_TEST_DATA',
        '../mbgl.gyp:<(core_library)',
        '../mbgl.gyp:<(platform_library)',
        '../mbgl.gyp:<(storage_library)',
        '../mbgl.gyp:<(headless_library)',
        '../deps/gtest/gtest.gyp:gtest'
      ],
      'sources': [
        'fixtures/main.cpp',
        'fixtures/util.hpp',
        'fixtures/util.cpp',
        'fixtures/fixture_log.hpp',
        'fixtures/fixture_log.cpp',

        'headless/headless.cpp',

        'miscellaneous/clip_ids.cpp',
        'miscellaneous/comparisons.cpp',
        'miscellaneous/enums.cpp',
        'miscellaneous/functions.cpp',
        'miscellaneous/merge_lines.cpp',
        'miscellaneous/rotation_range.cpp',
        'miscellaneous/style_parser.cpp',
        'miscellaneous/text_conversions.cpp',
        'miscellaneous/tile.cpp',
        'miscellaneous/variant.cpp',

        'storage/storage.hpp',
        'storage/storage.cpp',
        'storage/cache_response.cpp',
        'storage/cache_revalidate.cpp',
        'storage/directory_reading.cpp',
        'storage/file_reading.cpp',
        'storage/http_cancel.cpp',
        'storage/http_coalescing.cpp',
        'storage/http_error.cpp',
        'storage/http_header_parsing.cpp',
        'storage/http_load.cpp',
        'storage/http_noloop.cpp',
        'storage/http_other_loop.cpp',
        'storage/http_reading.cpp',
      ],
      'libraries': [
        '<@(uv_static_libs)',
        '<@(glfw3_static_libs)',
        '<@(sqlite3_static_libs)',
        '<@(zlib_static_libs)',
        '<@(curl_static_libs)',
      ],
      'variables': {
        'cflags_cc': [
          '<@(uv_cflags)',
          '-I<(boost_root)/include',
        ],
        'ldflags': [
          '<@(uv_ldflags)',
          '<@(glfw3_ldflags)',
          '<@(sqlite3_ldflags)',
          '<@(zlib_ldflags)',
          '<@(curl_ldflags)',
        ],
      },
      'conditions': [
        ['OS == "mac"', {
          'xcode_settings': {
            'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags_cc)' ],
            'OTHER_LDFLAGS': [ '<@(ldflags)' ],
          },
        }, {
         'cflags_cc': [ '<@(cflags_cc)' ],
         'libraries': [ '<@(ldflags)' ],
        }],
      ],
    },
  ]
}