-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.gn
106 lines (87 loc) · 2.32 KB
/
BUILD.gn
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
98
99
100
101
102
103
104
105
106
# Copyright 2020 Krayfaus. All rights reserved.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This configuration file is heavily inspired by @google/skia.
import("gn/shared_sources.gni")
import("gn/astraea_config.gni")
# Astraea public API, provided by :astraea.
config("astraea_public") {
include_dirs = [ "." ]
defines = []
cflags_objcc = []
}
# Astraea internal APIs.
config("astraea_private") {
visibility = [ ":*" ]
defines = []
libs = []
lib_dirs = []
}
# Any code that's linked into Astraea-the-library should use this config via += astraea_library_configs.
config("astraea_library") {
visibility = [ ":*" ]
defines = []
}
astraea_library_configs = [
":astraea_public",
":astraea_private",
":astraea_library",
]
component("astraea") {
public_configs = [ ":astraea_public" ]
configs += astraea_library_configs
public_deps = []
deps = []
# This file (and all GN files in Astraea) are designed to work with an
# empty sources assignment filter; we handle all that explicitly.
# We clear the filter here for clients who may have set up a global filter.
set_sources_assignment_filter([])
public = astraea_core_public
public += astraea_utils_public
sources = []
sources += astraea_core_sources
sources += astraea_utils_sources
defines = []
libs = []
if (is_win) {
sources += [
"source/utils/platform_console_win.cpp",
"source/utils/platform_string_win.cpp",
]
libs += [
"kernel32.lib",
"user32.lib",
# "gdi32.lib",
# "winspool.lib",
# "comdlg32.lib",
# "advapi32.lib",
"shell32.lib",
"ole32.lib",
"oleaut32.lib",
# "uuid.lib",
# "odbc32.lib",
# "odbccp32.lib",
# "fontsub.lib",
# "usp10.lib",
]
} else if (is_linux || is_mac) {
sources += [
"source/utils/platform_console_posix.cpp",
"source/utils/platform_string_posix.cpp",
]
}
}
executable("test") {
configs += astraea_library_configs
deps = [
":astraea",
]
# This file (and all GN files in Astraea) are designed to work with an
# empty sources assignment filter; we handle all that explicitly.
# We clear the filter here for clients who may have set up a global filter.
set_sources_assignment_filter([])
sources = [
"source/test/test.cpp",
]
}