summaryrefslogtreecommitdiff
path: root/src/third_party/s2/SConscript
blob: 4397cdf0f8989984d62c068ecef4c1b87fa26a91 (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
# -*- mode: python -*-

Import("env windows linux darwin solaris use_clang")

env = env.Clone()

env.SConscript( [
	"base/SConscript",
	"strings/SConscript",
	"util/coding/SConscript",
	"util/math/SConscript",
        ] )

env.Append(CCFLAGS=['-Isrc/third_party/s2'])
env.Append(CCFLAGS=['-DDEBUG_MODE=false'])

# Clang warns about struct/class tag mismatch, but as long as this is
# not a problem on Windows, these mismatches can be ignored
# http://stackoverflow.com/questions/4866425/mixing-class-and-struct. W
# warning so it doesn't become an error.
if use_clang:
    env.Append(CCFLAGS=['-Wno-mismatched-tags'])

env.Library( "s2",
    [ 
	"s1angle.cc",
	"s2.cc",
	"s2cellid.cc",
	"s2latlng.cc",
	"s1interval.cc",
	"s2cap.cc",
	"s2cell.cc",
	"s2cellunion.cc",
	"s2edgeindex.cc",
	"s2edgeutil.cc",
	"s2latlngrect.cc",
	"s2loop.cc",
	"s2pointregion.cc",
	"s2polygon.cc",
	"s2polygonbuilder.cc",
	"s2polyline.cc",
	"s2r2rect.cc",
	"s2region.cc",
	"s2regioncoverer.cc",
	"s2regionintersection.cc",
	"s2regionunion.cc",
    ], LIBDEPS=['$BUILD_DIR/third_party/s2/base/base',
		'$BUILD_DIR/third_party/s2/strings/strings',
		'$BUILD_DIR/third_party/s2/util/coding/coding',
		'$BUILD_DIR/third_party/s2/util/math/math'])

#env.Program('r1interval_test', ['r1interval_test.cc'],
#            LIBDEPS=['s2', '$BUILD_DIR/third_party/gtest/gtest_with_main'])
#env.Program('s1angle_test', ['s1angle_test.cc'],
#            LIBDEPS=['s2', '$BUILD_DIR/third_party/gtest/gtest_with_main'])
#env.Program('s1interval_test', ['s1interval_test.cc'],
#            LIBDEPS=['s2', '$BUILD_DIR/third_party/gtest/gtest_with_main'])
#env.Program('s2regioncoverer_test', ['s2regioncoverer_test.cc'],
#            LIBDEPS=['s2', '$BUILD_DIR/third_party/gtest/gtest_with_main'])
#env.Program('s2_test', ['s2_test.cc'],
#            LIBDEPS=['s2', '$BUILD_DIR/third_party/gtest/gtest_with_main'])