• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2024 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("third_libinput.gni")
16
17defines = third_input_default_defines
18gen_dst_dir = root_out_dir + "/diff_libinput_mmi"
19
20config("libinput-third_config") {
21  visibility = [ ":*" ]
22
23  include_dirs = [
24    "$gen_dst_dir/src",
25    "$gen_dst_dir/include",
26    "$gen_dst_dir/hm_src",
27  ]
28
29  cflags = [
30    "-Wno-unused-parameter",
31    "-Wno-implicit-int",
32    "-Wno-return-type",
33    "-Wno-unused-function",
34    "-Wno-string-conversion",
35    "-DHAVE_LIBINPUT_LOG_CONSOLE_ENABLE",
36    "-DHAVE_LIBINPUT_LOG_ENABLE",
37  ]
38}
39
40config("libinput-third_public_config") {
41  include_dirs = [
42    "$gen_dst_dir/export_include",
43    "$gen_dst_dir/include",
44    "$gen_dst_dir/src",
45  ]
46
47  cflags = []
48}
49
50ohos_source_set("patch_gen_libinput-third-mmi") {
51  part_name = "input"
52  subsystem_name = "multimodalinput"
53  sources = [
54    root_out_dir + "/diff_libinput_mmi/src/evdev-debounce.c",
55    root_out_dir + "/diff_libinput_mmi/src/evdev-fallback.c",
56    root_out_dir + "/diff_libinput_mmi/src/evdev-joystick.c",
57    root_out_dir + "/diff_libinput_mmi/src/evdev-privacy-switch.c",
58    root_out_dir + "/diff_libinput_mmi/src/evdev-middle-button.c",
59    root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad-buttons.c",
60    root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad-edge-scroll.c",
61    root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad-gestures.c",
62    root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad-tap.c",
63    root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad-thumb.c",
64    root_out_dir + "/diff_libinput_mmi/src/evdev-mt-touchpad.c",
65    root_out_dir + "/diff_libinput_mmi/src/evdev-tablet-pad-leds.c",
66    root_out_dir + "/diff_libinput_mmi/src/evdev-tablet-pad.c",
67    root_out_dir + "/diff_libinput_mmi/src/evdev-tablet.c",
68    root_out_dir + "/diff_libinput_mmi/src/evdev-totem.c",
69    root_out_dir + "/diff_libinput_mmi/src/evdev-wheel.c",
70    root_out_dir + "/diff_libinput_mmi/src/evdev.c",
71    root_out_dir + "/diff_libinput_mmi/src/filter-custom.c",
72    root_out_dir + "/diff_libinput_mmi/src/filter-flat.c",
73    root_out_dir + "/diff_libinput_mmi/src/filter-low-dpi.c",
74    root_out_dir + "/diff_libinput_mmi/src/filter-mouse.c",
75    root_out_dir + "/diff_libinput_mmi/src/filter-tablet.c",
76    root_out_dir + "/diff_libinput_mmi/src/filter-touchpad-flat.c",
77    root_out_dir + "/diff_libinput_mmi/src/filter-touchpad-x230.c",
78    root_out_dir + "/diff_libinput_mmi/src/filter-touchpad.c",
79    root_out_dir + "/diff_libinput_mmi/src/filter-trackpoint-flat.c",
80    root_out_dir + "/diff_libinput_mmi/src/filter-trackpoint.c",
81    root_out_dir + "/diff_libinput_mmi/src/filter.c",
82    root_out_dir + "/diff_libinput_mmi/src/libinput-util.c",
83    root_out_dir + "/diff_libinput_mmi/src/libinput.c",
84    root_out_dir + "/diff_libinput_mmi/src/path-seat.c",
85    root_out_dir + "/diff_libinput_mmi/src/quirks.c",
86    root_out_dir + "/diff_libinput_mmi/src/timer.c",
87    root_out_dir + "/diff_libinput_mmi/src/util-list.c",
88    root_out_dir + "/diff_libinput_mmi/src/util-prop-parsers.c",
89    root_out_dir + "/diff_libinput_mmi/src/util-ratelimit.c",
90    root_out_dir + "/diff_libinput_mmi/src/util-strings.c",
91  ]
92  branch_protector_ret = "pac_ret"
93  sanitize = {
94    cfi = true
95    cfi_cross_dso = true
96    debug = false
97  }
98  configs = [ ":libinput-third_config" ]
99
100  public_configs = [ ":libinput-third_public_config" ]
101
102  deps = [ "//third_party/libinput/patch:apply_patch" ]
103
104  public_external_deps = [
105    "input:mmi_libudev",
106    "libevdev:libevdev",
107    "mtdev:libmtdev-third-mmi",
108  ]
109}
110
111ohos_shared_library("libinput-third-mmi") {
112  sources = []
113  branch_protector_ret = "pac_ret"
114  sanitize = {
115    cfi = true
116    cfi_cross_dso = true
117    debug = false
118  }
119  configs = [ ":libinput-third_config" ]
120
121  public_configs = [ ":libinput-third_public_config" ]
122
123  deps = [ ":patch_gen_libinput-third-mmi" ]
124
125  public_external_deps = [
126    "input:mmi_libudev",
127    "libevdev:libevdev",
128    "mtdev:libmtdev-third-mmi",
129  ]
130
131  external_deps = [ "hilog:libhilog" ]
132  license_file = "//third_party/libinput/COPYING"
133  part_name = "input"
134  subsystem_name = "multimodalinput"
135}
136
137ohos_source_set("patch_gen_libinput-debug") {
138  part_name = "input"
139  subsystem_name = "multimodalinput"
140  sources = [
141    "$gen_dst_dir/tools/libinput-debug-events.c",
142    "$gen_dst_dir/tools/shared.c",
143    "$gen_dst_dir/tools/shared.h",
144  ]
145  branch_protector_ret = "pac_ret"
146  sanitize = {
147    cfi = true
148    cfi_cross_dso = true
149    debug = false
150  }
151  configs = [ ":libinput-third_config" ]
152
153  public_configs = [ ":libinput-third_public_config" ]
154
155  deps = [ "//third_party/libinput/patch:apply_patch" ]
156
157  public_external_deps = [
158    "input:mmi_libudev",
159    "libevdev:libevdev",
160    "mtdev:libmtdev-third-mmi",
161  ]
162}
163
164ohos_executable("libinput-debug-mmi") {
165  install_enable = true
166
167  sources = []
168  branch_protector_ret = "pac_ret"
169  sanitize = {
170    cfi = true
171    cfi_cross_dso = true
172    debug = false
173  }
174  configs = [ ":libinput-third_config" ]
175
176  public_configs = [ ":libinput-third_public_config" ]
177
178  deps = [
179    ":libinput-third-mmi",
180    ":patch_gen_libinput-debug",
181  ]
182
183  public_external_deps = [
184    "input:mmi_libudev",
185    "libevdev:libevdev",
186    "mtdev:libmtdev-third-mmi",
187  ]
188
189  part_name = "input"
190  subsystem_name = "multimodalinput"
191}
192
193ohos_source_set("patch_gen_libinput-list") {
194  part_name = "input"
195  subsystem_name = "multimodalinput"
196  sources = [
197    "$gen_dst_dir/tools/libinput-list-devices.c",
198    "$gen_dst_dir/tools/shared.c",
199    "$gen_dst_dir/tools/shared.h",
200  ]
201  branch_protector_ret = "pac_ret"
202  sanitize = {
203    cfi = true
204    cfi_cross_dso = true
205    debug = false
206  }
207  configs = [ ":libinput-third_config" ]
208
209  public_configs = [ ":libinput-third_public_config" ]
210
211  deps = [ "//third_party/libinput/patch:apply_patch" ]
212
213  public_external_deps = [
214    "input:mmi_libudev",
215    "libevdev:libevdev",
216    "mtdev:libmtdev-third-mmi",
217  ]
218}
219
220ohos_executable("libinput-list-mmi") {
221  install_enable = true
222
223  sources = []
224  branch_protector_ret = "pac_ret"
225  sanitize = {
226    cfi = true
227    cfi_cross_dso = true
228    debug = false
229  }
230  configs = [ ":libinput-third_config" ]
231
232  public_configs = [ ":libinput-third_public_config" ]
233
234  deps = [
235    ":libinput-third-mmi",
236    ":patch_gen_libinput-list",
237  ]
238
239  public_external_deps = [
240    "input:mmi_libudev",
241    "libevdev:libevdev",
242    "mtdev:libmtdev-third-mmi",
243  ]
244
245  part_name = "input"
246  subsystem_name = "multimodalinput"
247}
248
249ohos_source_set("patch_gen_libinput-tablet") {
250  part_name = "input"
251  subsystem_name = "multimodalinput"
252  sources = [
253    "$gen_dst_dir/tools/libinput-debug-tablet.c",
254    "$gen_dst_dir/tools/shared.c",
255    "$gen_dst_dir/tools/shared.h",
256  ]
257  branch_protector_ret = "pac_ret"
258  sanitize = {
259    cfi = true
260    cfi_cross_dso = true
261    debug = false
262  }
263  configs = [ ":libinput-third_config" ]
264
265  public_configs = [ ":libinput-third_public_config" ]
266
267  deps = [ "//third_party/libinput/patch:apply_patch" ]
268
269  public_external_deps = [
270    "input:mmi_libudev",
271    "libevdev:libevdev",
272    "mtdev:libmtdev-third-mmi",
273  ]
274}
275
276ohos_executable("libinput-tablet-mmi") {
277  install_enable = true
278
279  sources = []
280  branch_protector_ret = "pac_ret"
281  sanitize = {
282    cfi = true
283    cfi_cross_dso = true
284    debug = false
285  }
286  configs = [ ":libinput-third_config" ]
287
288  public_configs = [ ":libinput-third_public_config" ]
289
290  deps = [
291    ":libinput-third-mmi",
292    ":patch_gen_libinput-tablet",
293  ]
294
295  public_external_deps = [
296    "input:mmi_libudev",
297    "libevdev:libevdev",
298    "mtdev:libmtdev-third-mmi",
299  ]
300
301  part_name = "input"
302  subsystem_name = "multimodalinput"
303}
304
305ohos_source_set("patch_gen_libinput-record") {
306  part_name = "input"
307  subsystem_name = "multimodalinput"
308  sources = [
309    "$gen_dst_dir/hm_src/hm_missing.c",
310    "$gen_dst_dir/tools/libinput-record.c",
311    "$gen_dst_dir/tools/shared.c",
312    "$gen_dst_dir/tools/shared.h",
313  ]
314  branch_protector_ret = "pac_ret"
315  sanitize = {
316    cfi = true
317    cfi_cross_dso = true
318    debug = false
319  }
320  configs = [ ":libinput-third_config" ]
321
322  public_configs = [ ":libinput-third_public_config" ]
323
324  deps = [ "//third_party/libinput/patch:apply_patch" ]
325
326  public_external_deps = [
327    "input:mmi_libudev",
328    "libevdev:libevdev",
329    "mtdev:libmtdev-third-mmi",
330  ]
331}
332
333ohos_executable("libinput-record-mmi") {
334  install_enable = true
335
336  sources = []
337  branch_protector_ret = "pac_ret"
338  sanitize = {
339    cfi = true
340    cfi_cross_dso = true
341    debug = false
342  }
343  configs = [ ":libinput-third_config" ]
344
345  public_configs = [ ":libinput-third_public_config" ]
346
347  deps = [
348    ":libinput-third-mmi",
349    ":patch_gen_libinput-record",
350  ]
351
352  public_external_deps = [
353    "input:mmi_libudev",
354    "libevdev:libevdev",
355    "mtdev:libmtdev-third-mmi",
356  ]
357
358  part_name = "input"
359  subsystem_name = "multimodalinput"
360}
361
362ohos_source_set("patch_gen_libinput-analyze") {
363  part_name = "input"
364  subsystem_name = "multimodalinput"
365  sources = [
366    "$gen_dst_dir/tools/libinput-analyze.c",
367    "$gen_dst_dir/tools/shared.c",
368    "$gen_dst_dir/tools/shared.h",
369  ]
370  branch_protector_ret = "pac_ret"
371  sanitize = {
372    cfi = true
373    cfi_cross_dso = true
374    debug = false
375  }
376  configs = [ ":libinput-third_config" ]
377
378  public_configs = [ ":libinput-third_public_config" ]
379
380  deps = [ "//third_party/libinput/patch:apply_patch" ]
381
382  public_external_deps = [
383    "input:mmi_libudev",
384    "libevdev:libevdev",
385    "mtdev:libmtdev-third-mmi",
386  ]
387}
388
389ohos_executable("libinput-analyze-mmi") {
390  install_enable = true
391
392  sources = []
393  branch_protector_ret = "pac_ret"
394  sanitize = {
395    cfi = true
396    cfi_cross_dso = true
397    debug = false
398  }
399  configs = [ ":libinput-third_config" ]
400
401  public_configs = [ ":libinput-third_public_config" ]
402
403  deps = [
404    ":libinput-third-mmi",
405    ":patch_gen_libinput-analyze",
406  ]
407
408  public_external_deps = [
409    "input:mmi_libudev",
410    "libevdev:libevdev",
411    "mtdev:libmtdev-third-mmi",
412  ]
413
414  part_name = "input"
415  subsystem_name = "multimodalinput"
416}
417
418ohos_source_set("patch_gen_libinput-measure") {
419  part_name = "input"
420  subsystem_name = "multimodalinput"
421  sources = [
422    "$gen_dst_dir/tools/libinput-measure.c",
423    "$gen_dst_dir/tools/shared.c",
424    "$gen_dst_dir/tools/shared.h",
425  ]
426  branch_protector_ret = "pac_ret"
427  sanitize = {
428    cfi = true
429    cfi_cross_dso = true
430    debug = false
431  }
432  configs = [ ":libinput-third_config" ]
433
434  public_configs = [ ":libinput-third_public_config" ]
435
436  deps = [ "//third_party/libinput/patch:apply_patch" ]
437
438  public_external_deps = [
439    "input:mmi_libudev",
440    "libevdev:libevdev",
441    "mtdev:libmtdev-third-mmi",
442  ]
443}
444
445ohos_executable("libinput-measure-mmi") {
446  install_enable = true
447
448  sources = []
449  branch_protector_ret = "pac_ret"
450  sanitize = {
451    cfi = true
452    cfi_cross_dso = true
453    debug = false
454  }
455  configs = [ ":libinput-third_config" ]
456
457  public_configs = [ ":libinput-third_public_config" ]
458
459  deps = [
460    ":libinput-third-mmi",
461    ":patch_gen_libinput-measure",
462  ]
463
464  public_external_deps = [
465    "input:mmi_libudev",
466    "libevdev:libevdev",
467    "mtdev:libmtdev-third-mmi",
468  ]
469
470  part_name = "input"
471  subsystem_name = "multimodalinput"
472}
473
474ohos_source_set("patch_gen_libinput-quirks") {
475  part_name = "input"
476  subsystem_name = "multimodalinput"
477  sources = [
478    "$gen_dst_dir/tools/libinput-quirks.c",
479    "$gen_dst_dir/tools/shared.c",
480    "$gen_dst_dir/tools/shared.h",
481  ]
482  branch_protector_ret = "pac_ret"
483  sanitize = {
484    cfi = true
485    cfi_cross_dso = true
486    debug = false
487  }
488  configs = [ ":libinput-third_config" ]
489
490  public_configs = [ ":libinput-third_public_config" ]
491
492  deps = [ "//third_party/libinput/patch:apply_patch" ]
493
494  public_external_deps = [
495    "input:mmi_libudev",
496    "libevdev:libevdev",
497    "mtdev:libmtdev-third-mmi",
498  ]
499}
500
501ohos_executable("libinput-quirks-mmi") {
502  install_enable = true
503
504  sources = []
505  branch_protector_ret = "pac_ret"
506  sanitize = {
507    cfi = true
508    cfi_cross_dso = true
509    debug = false
510  }
511  configs = [ ":libinput-third_config" ]
512
513  public_configs = [ ":libinput-third_public_config" ]
514
515  deps = [
516    ":libinput-third-mmi",
517    ":patch_gen_libinput-quirks",
518  ]
519
520  public_external_deps = [
521    "input:mmi_libudev",
522    "libevdev:libevdev",
523    "mtdev:libmtdev-third-mmi",
524  ]
525
526  part_name = "input"
527  subsystem_name = "multimodalinput"
528}
529