• 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")
15import("//foundation/graphic/graphic_3d/lume/lume_config.gni")
16
17config("lume_scenewidget_config") {
18  include_dirs = [
19    "include",
20    "src",
21    "${LUME_META_PATH}/include",
22    "${LUME_CORE_PATH}/ecshelper"
23  ]
24
25  defines = [
26    "__OHOS_PLATFORM__",
27    "CORE3D_PUBLIC=__attribute__((visibility(\"default\")))",
28    "CORE_USE_COMPILER_GENERATED_STATIC_LIST=1",
29    "CORE3D_SHARED_LIBRARY=1",
30    "CORE3D_VALIDATION_ENABLED=0",
31    "CORE3D_TESTS_ENABLED=0",
32    "CORE3D_DEV_ENABLED=${CORE_DEV_ENABLED}",
33    "CORE3D_PUBLIC=__attribute__((visibility(\"default\")))",
34    "CORE_USE_COMPILER_GENERATED_STATIC_LIST=1",
35    "CORE_STATIC_PLUGIN_HEADER=${CORE_STATIC_PLUGIN_HEADER }"
36  ]
37  cflags = [
38    "-Wno-unused-function",
39    "-Wno-unused-parameter",
40    "-Wno-sign-compare",
41    "-Wno-unused-variable",
42    "-Wno-unused-private-field",
43    "-Wno-tautological-unsigned-zero-compare",
44    "-Wno-logical-op-parentheses",
45    "-Wno-unused-local-typedef",
46    "-fvisibility=hidden",
47    "-ffunction-sections",
48    "-fdata-sections",
49    "-Wno-ignored-qualifiers",
50  ]
51  cflags_cc = [
52    "-std=c++17",
53    "-Wno-overloaded-virtual",
54    "-Wno-thread-safety-attributes",
55    "-Wno-missing-braces",
56    ]
57}
58
59ohos_source_set("lume_scenewidget_src") {
60  configs = [
61    ":lume_scenewidget_config",
62    "${LUME_ROOT}/Lume_3DText:lume_3dtext_api",
63    "${LUME_RENDER_PATH}:lume_render_api",
64    "${LUME_CORE_PATH}:lume_base_api",
65    "${LUME_CORE_PATH}:lume_engine_api",
66    "${LUME_CORE_PATH}:lume_component_help_config",
67    "${LUME_SERIALIZER_PATH}:ecs_serializer_api",
68    "${LUME_CORE_PATH}:lume_default"
69  ]
70
71  sources = [
72    "src/application_context.h",
73    "src/asset/asset_object.cpp",
74    "src/asset/asset_object.h",
75    "src/component/animation_component.cpp",
76    "src/component/animation_component.h",
77    "src/component/camera_component.cpp",
78    "src/component/camera_component.h",
79    "src/component/environment_component.cpp",
80    "src/component/environment_component.h",
81    "src/component/generic_component.cpp",
82    "src/component/generic_component.h",
83    "src/component/layer_component.cpp",
84    "src/component/layer_component.h",
85    "src/component/light_component.cpp",
86    "src/component/light_component.h",
87    "src/component/material_component.cpp",
88    "src/component/material_component.h",
89    "src/component/mesh_component.cpp",
90    "src/component/mesh_component.h",
91    "src/component/node_component.cpp",
92    "src/component/node_component.h",
93    "src/component/postprocess_component.cpp",
94    "src/component/postprocess_component.h",
95    "src/component/text_component.cpp",
96    "src/component/text_component.h",
97    "src/component/transform_component.cpp",
98    "src/component/transform_component.h",
99    "src/component_factory.h",
100    "src/converting_value.h",
101    "src/core/camera.cpp",
102    "src/core/camera.h",
103    "src/core/ecs.cpp",
104    "src/core/ecs.h",
105    "src/core/ecs_listener.cpp",
106    "src/core/ecs_listener.h",
107    "src/core/ecs_object.cpp",
108    "src/core/ecs_object.h",
109    "src/core/internal_scene.cpp",
110    "src/core/internal_scene.h",
111    "src/core/intf_internal_raycast.h",
112    "src/ecs_component/entity_owner_component.h",
113    "src/ecs_component/entity_owner_component_info.h",
114    "src/ecs_component/entity_owner_component_manager.cpp",
115    "src/entity_converting_value.h",
116    "src/mesh/mesh.cpp",
117    "src/mesh/mesh.h",
118    "src/mesh/mesh_creator.cpp",
119    "src/mesh/mesh_creator.h",
120    "src/mesh/mesh_resource.h",
121    "src/mesh/sampler.cpp",
122    "src/mesh/sampler.h",
123    "src/mesh/submesh.cpp",
124    "src/mesh/submesh.h",
125    "src/mesh/texture.cpp",
126    "src/mesh/texture.h",
127    "src/node/camera_node.cpp",
128    "src/node/camera_node.h",
129    "src/node/light_node.cpp",
130    "src/node/light_node.h",
131    "src/node/mesh_node.cpp",
132    "src/node/mesh_node.h",
133    "src/node/node.cpp",
134    "src/node/node.h",
135    "src/node/startable_handler.cpp",
136    "src/node/startable_handler.h",
137    "src/node/text_node.cpp",
138    "src/node/text_node.h",
139    "src/plugin.cpp",
140    "src/postprocess/bloom.cpp",
141    "src/postprocess/bloom.h",
142    "src/postprocess/postprocess.cpp",
143    "src/postprocess/postprocess.h",
144    "src/postprocess/tonemap.cpp",
145    "src/postprocess/tonemap.h",
146    "src/postprocess/util.h",
147    "src/register_anys.cpp",
148    "src/register_engine_access.cpp",
149    "src/register_serializers.cpp",
150    "src/render_configuration.cpp",
151    "src/render_configuration.h",
152    "src/render_context.h",
153    "src/resource/ecs_animation.cpp",
154    "src/resource/ecs_animation.h",
155    "src/resource/environment.cpp",
156    "src/resource/environment.h",
157    "src/resource/image.cpp",
158    "src/resource/image.h",
159    "src/resource/material.cpp",
160    "src/resource/material.h",
161    "src/resource/render_resource.cpp",
162    "src/resource/render_resource.h",
163    "src/resource/render_resource_manager.cpp",
164    "src/resource/render_resource_manager.h",
165    "src/resource/resource_types.cpp",
166    "src/resource/resource_types.h",
167    "src/resource/shader.cpp",
168    "src/resource/shader.h",
169    "src/resource/types/animation_type.cpp",
170    "src/resource/types/animation_type.h",
171    "src/resource/types/environment_type.cpp",
172    "src/resource/types/environment_type.h",
173    "src/resource/types/gltf_scene_type.cpp",
174    "src/resource/types/gltf_scene_type.h",
175    "src/resource/types/image_type.cpp",
176    "src/resource/types/image_type.h",
177    "src/resource/types/material_type.cpp",
178    "src/resource/types/material_type.h",
179    "src/resource/types/postprocess_type.cpp",
180    "src/resource/types/postprocess_type.h",
181    "src/resource/types/scene_type.cpp",
182    "src/resource/types/scene_type.h",
183    "src/resource/types/shader_type.cpp",
184    "src/resource/types/shader_type.h",
185    "src/scene.cpp",
186    "src/scene.h",
187    "src/scene_manager.cpp",
188    "src/scene_manager.h",
189    "src/serialization/external_node.h",
190    "src/serialization/scene_exporter.cpp",
191    "src/serialization/scene_exporter.h",
192    "src/serialization/scene_importer.cpp",
193    "src/serialization/scene_importer.h",
194    "src/serialization/scene_ser.h",
195    "src/serialization/util.h",
196    "src/util.h",
197    "src/util_interfaces.h",
198  ]
199
200  include_dirs = [
201    "${LUME_BASE_PATH}/api",
202    "${LUME_CORE_PATH}/api",
203    "${LUME_RENDER_PATH}/api",
204    "${LUME_CORE3D_PATH}/api",
205    "${LUME_META_PATH}/include"
206  ]
207
208  deps = [
209    "${LUME_META_PATH}:libPluginMetaObject",
210    "${LUME_CORE_PATH}/ecshelper:libAGPEcshelper"
211  ]
212  external_deps = [
213    "c_utils:utils",
214  ]
215  part_name = "graphic_3d"
216  subsystem_name = "graphic"
217}
218
219#ohos_static_library("libSceneWidget") {
220#  public_deps = [
221#    ":lume_scenewidget_src",
222#  ]
223#  part_name = "graphic_3d"
224#  subsystem_name = "graphic"
225#}
226
227ohos_shared_library("libPluginSceneWidget") {
228  deps = [
229    "${LUME_SERIALIZER_PATH}:EcsSerializer",
230    ":lume_scenewidget_src",
231  ]
232  relative_install_dir = "graphics3d"
233  part_name = "graphic_3d"
234  subsystem_name = "graphic"
235}
236