-
Notifications
You must be signed in to change notification settings - Fork 2
/
BUILD.bazel
73 lines (65 loc) · 1.57 KB
/
BUILD.bazel
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
load("//lib:defs.bzl", "include_dir", "library_path", "runtime_path", "static_lib")
load("//lib:lib.bzl", "package_lib")
# Library deps:
load("//lib/sqlite:package.bzl", SQLITE_SPEC = "SPEC")
load("//toolchains:utils.bzl", "no_error")
load("//toolchains/cmake:cmake.bzl", "cache_entries", "cmake_lib")
load(":package.bzl", "NAME")
package(default_visibility = ["//:__subpackages__"])
package_lib()
BUILD_DEPS = [
"//lib/sqlite:runtime",
]
BINARIES = [
# keep sorted
"cct",
"cs2cs",
"geod",
"gie",
"proj",
"projinfo",
"projsync",
]
BUILD_FLAGS = {
"build_{}".format(component): False
for component in BINARIES + [
"shared_libs",
"testing",
]
}
CACHE_ENTRIES = cache_entries(
BUILD_FLAGS,
cmake_c_flags = no_error([
# keep sorted
"incompatible-library-redeclaration",
]),
openssl_crypto_library = library_path(
"openssl",
static_lib("crypto"),
),
openssl_include_dir = include_dir("openssl"),
deps = {
"curl": {},
"sqlite3": SQLITE_SPEC,
"tiff": {},
},
)
cmake_lib(
name = NAME,
build_data = BUILD_DEPS,
cache_entries = {
"//config:wasm": cache_entries(
CACHE_ENTRIES,
# The C++ library uses exceptions, so enable them explicitly.
cmake_cxx_flags = "-fexceptions",
),
"//conditions:default": CACHE_ENTRIES,
},
env = {"PATH": runtime_path(BUILD_DEPS)},
deps = [
"//lib/curl",
"//lib/openssl",
"//lib/sqlite",
"//lib/tiff",
],
)