• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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")
15
16## Build libdrm.so {{{
17config("libdrm_config") {
18  visibility = [ ":*" ]
19
20  include_dirs = []
21
22  cflags = [
23    "-Wno-deprecated-declarations",
24    "-Wno-enum-conversion",
25    "-DMAJOR_IN_SYSMACROS=1",
26  ]
27}
28
29config("libdrm_public_config") {
30  include_dirs = [
31    ".",
32    "include",
33    "include/drm",
34  ]
35
36  cflags = []
37}
38
39ohos_shared_library("libdrm") {
40  output_prefix_override = true
41  output_name = "libdrm"
42  output_extension = "so"
43
44  sources = [
45    "xf86drm.c",
46    "xf86drmHash.c",
47    "xf86drmMode.c",
48    "xf86drmRandom.c",
49  ]
50
51  configs = [ ":libdrm_config" ]
52
53  public_configs = [ ":libdrm_public_config" ]
54
55  deps = []
56
57  public_deps = []
58  install_images = [
59    "system",
60    "updater",
61  ]
62  innerapi_tags = [ "chipsetsdk" ]
63  part_name = "libdrm"
64  subsystem_name = "thirdparty"
65}
66## Build libdrm.so }}}
67