• 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.
13import("//build/ohos.gni")
14import("//foundation/graphic/graphic_3d/lume/lume_config.gni")
15config("lume_jpg_api") {
16  include_dirs = [ "api" ]
17}
18
19config("lume_jpg_config") {
20  include_dirs = [ "src" ]
21  defines = [
22    "CORE_USE_COMPILER_GENERATED_STATIC_LIST=1",
23    "CORE_STATIC_PLUGIN_HEADER=${CORE_STATIC_PLUGIN_HEADER}",
24  ]
25  if (LUME_OHOS_BUILD) {
26    defines += [ "__OHOS_PLATFORM__" ]
27  }
28}
29
30ohos_source_set("lume_jpg_src") {
31  configs = [
32    ":lume_jpg_config",
33    ":lume_jpg_api",
34    "${LUME_CORE_PATH}:lume_base_api",
35    "${LUME_CORE_PATH}:lume_engine_api",
36  ]
37
38  sources = [ "src/jpg/image_loader_jpg.cpp" ]
39
40  external_deps = [
41    "c_utils:utils",
42    "libjpeg-turbo:turbojpeg",
43  ]
44
45  part_name = "graphic_3d"
46  subsystem_name = "graphic"
47}
48
49ohos_static_library("libJpgStatic") {
50  deps = [ ":lume_jpg_src" ]
51  part_name = "graphic_3d"
52  subsystem_name = "graphic"
53}
54
55config("lume_plugin_jpg_config") {
56  defines = [ "CORE_PLUGIN=1" ]
57}
58
59ohos_source_set("lume_plugin_jpg_src") {
60  sources = [ "src/component_dll.cpp" ]
61
62  configs = [
63    ":lume_plugin_jpg_config",
64    ":lume_jpg_config",
65    ":lume_jpg_api",
66    "${LUME_CORE_PATH}:lume_base_api",
67    "${LUME_CORE_PATH}:lume_engine_api",
68  ]
69  part_name = "graphic_3d"
70  subsystem_name = "graphic"
71}
72
73ohos_shared_library(LIB_JPG) {
74  deps = [
75    ":libJpgStatic",
76    ":lume_plugin_jpg_src",
77  ]
78
79  relative_install_dir = "graphics3d"
80  part_name = "graphic_3d"
81  subsystem_name = "graphic"
82}
83