forked from openharmony/developtools_hdc_standard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.gn
138 lines (127 loc) · 3.61 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/ohos.gni")
HDC_PATH = "//developtools/hdc_standard"
hdc_common_sources = [
"${HDC_PATH}/src/common/async_cmd.cpp",
"${HDC_PATH}/src/common/auth.cpp",
"${HDC_PATH}/src/common/base.cpp",
"${HDC_PATH}/src/common/channel.cpp",
"${HDC_PATH}/src/common/debug.cpp",
"${HDC_PATH}/src/common/file.cpp",
"${HDC_PATH}/src/common/file_descriptor.cpp",
"${HDC_PATH}/src/common/forward.cpp",
"${HDC_PATH}/src/common/session.cpp",
"${HDC_PATH}/src/common/task.cpp",
"${HDC_PATH}/src/common/tcp.cpp",
"${HDC_PATH}/src/common/transfer.cpp",
"${HDC_PATH}/src/common/usb.cpp",
]
config("hdc_config") {
include_dirs = [ "${HDC_PATH}/src/common" ]
cflags_cc = [ "-std=c++17" ]
}
ohos_executable("hdcd") {
sources = [
"src/daemon/daemon.cpp",
"src/daemon/daemon_app.cpp",
"src/daemon/daemon_forward.cpp",
"src/daemon/daemon_tcp.cpp",
"src/daemon/daemon_unity.cpp",
"src/daemon/daemon_usb.cpp",
"src/daemon/jdwp.cpp",
"src/daemon/main.cpp",
"src/daemon/shell.cpp",
]
sources += hdc_common_sources
defines = [ "HARMONY_PROJECT" ]
configs = [ ":hdc_config" ]
deps = [
"//third_party/libuv:uv_static",
"//third_party/lz4:liblz4_static",
"//third_party/openssl:libcrypto_static",
"//utils/native/base:utils",
]
if (use_musl) {
deps += [
"//base/startup/init_lite/interfaces/innerkits/reboot:libreboot",
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
]
}
include_dirs = [
"${HDC_PATH}/daemon",
"//utils/native/base/include",
"//third_party/lz4/lib",
"//third_party/openssl/include",
"//third_party/libuv",
]
if (use_musl) {
include_dirs += [
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include",
]
}
install_enable = true
subsystem_name = "developtools"
part_name = "hdc_standard"
}
ohos_executable("hdc_std") {
configs = [ ":hdc_config" ]
defines = [
"HDC_HOST",
"HARMONY_PROJECT",
]
if (is_mac) {
defines += [ "HOST_MAC" ]
}
cflags_cc = [
"-Wno-error",
"-Wno-error=unused-variable",
"-Wno-unused-variable",
]
sources = [
"src/host/client.cpp",
"src/host/host_app.cpp",
"src/host/host_forward.cpp",
"src/host/host_tcp.cpp",
"src/host/host_unity.cpp",
"src/host/host_usb.cpp",
"src/host/main.cpp",
"src/host/server.cpp",
"src/host/server_for_client.cpp",
"src/host/translate.cpp",
]
sources += hdc_common_sources
deps = [
"//third_party/libusb:libusb",
"//third_party/libuv:uv_static",
"//third_party/lz4:liblz4_static",
"//third_party/openssl:libcrypto_static",
"//utils/native/base:utilsecurec",
]
include_dirs = [
"${HDC_PATH}/daemon",
"//utils/native/base/include",
"//third_party/lz4/lib",
"//third_party/openssl/include",
"//third_party/libuv",
]
subsystem_name = "developtools"
part_name = "hdc_standard"
}
group("hdc_target_standard") {
deps = [
":hdc_std",
":hdcd",
]
}