• 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    "include/scene/base/namespace.h",
73    "include/scene/base/types.h",
74    "include/scene/ext/component_fwd.h",
75    "include/scene/ext/component_util.h",
76    "include/scene/ext/ecs_lazy_property_fwd.h",
77    "include/scene/ext/intf_component.h",
78    "include/scene/ext/intf_component_factory.h",
79    "include/scene/ext/intf_converting_value.h",
80    "include/scene/ext/intf_create_entity.h",
81    "include/scene/ext/intf_ecs_context.h",
82    "include/scene/ext/intf_ecs_event_listener.h",
83    "include/scene/ext/intf_ecs_object.h",
84    "include/scene/ext/intf_ecs_object_access.h",
85    "include/scene/ext/intf_engine_property_init.h",
86    "include/scene/ext/intf_internal_camera.h",
87    "include/scene/ext/intf_internal_scene.h",
88    "include/scene/ext/intf_render_resource.h",
89    "include/scene/ext/named_scene_object.h",
90    "include/scene/ext/scene_property.h",
91    "include/scene/ext/util.h",
92    "include/scene/interface/component_util.h",
93    "include/scene/interface/intf_bitmap.h",
94    "include/scene/interface/intf_camera.h",
95    "include/scene/interface/intf_create_mesh.h",
96    "include/scene/interface/intf_environment.h",
97    "include/scene/interface/intf_layer.h",
98    "include/scene/interface/intf_light.h",
99    "include/scene/interface/intf_material.h",
100    "include/scene/interface/intf_mesh.h",
101    "include/scene/interface/intf_node.h",
102    "include/scene/interface/intf_postprocess.h",
103    "include/scene/interface/intf_raycast.h",
104    "include/scene/interface/intf_render_configuration.h",
105    "include/scene/interface/intf_render_target.h",
106    "include/scene/interface/intf_scene.h",
107    "include/scene/interface/intf_scene_manager.h",
108    "include/scene/interface/intf_shader.h",
109    "include/scene/interface/intf_text.h",
110    "include/scene/interface/intf_texture.h",
111    "include/scene/interface/intf_transform.h",
112    "include/scene/interface/postprocess/intf_bloom.h",
113    "include/scene/interface/postprocess/intf_postprocess_effect.h",
114    "include/scene/interface/postprocess/intf_tonemap.h",
115    "src/asset/asset_object.cpp",
116    "src/asset/asset_object.h",
117    "src/bitmap.cpp",
118    "src/bitmap.h",
119    "src/component/animation_component.cpp",
120    "src/component/animation_component.h",
121    "src/component/camera_component.cpp",
122    "src/component/camera_component.h",
123    "src/component/enviroment_component.h",
124    "src/component/environment_component.cpp",
125    "src/component/generic_component.cpp",
126    "src/component/generic_component.h",
127    "src/component/layer_component.cpp",
128    "src/component/layer_component.h",
129    "src/component/light_component.cpp",
130    "src/component/light_component.h",
131    "src/component/material_component.cpp",
132    "src/component/material_component.h",
133    "src/component/mesh_component.cpp",
134    "src/component/mesh_component.h",
135    "src/component/node_component.cpp",
136    "src/component/node_component.h",
137    "src/component/postprocess_component.cpp",
138    "src/component/postprocess_component.h",
139    "src/component/text_component.cpp",
140    "src/component/text_component.h",
141    "src/component/transform_component.cpp",
142    "src/component/transform_component.h",
143    "src/component_factory.h",
144    "src/converting_value.h",
145    "src/core/camera.cpp",
146    "src/core/camera.h",
147    "src/core/ecs.cpp",
148    "src/core/ecs.h",
149    "src/core/ecs_listener.cpp",
150    "src/core/ecs_listener.h",
151    "src/core/ecs_object.cpp",
152    "src/core/ecs_object.h",
153    "src/core/internal_raycast.h",
154    "src/core/internal_scene.cpp",
155    "src/core/internal_scene.h",
156    "src/ecs_animation.cpp",
157    "src/ecs_animation.h",
158    "src/ecs_component/entity_owner_component.h",
159    "src/ecs_component/entity_owner_component_info.h",
160    "src/ecs_component/entity_owner_component_manager.cpp",
161    "src/entity_converting_value.h",
162    "src/environment.cpp",
163    "src/environment.h",
164    "src/mesh/material.cpp",
165    "src/mesh/material.h",
166    "src/mesh/mesh.cpp",
167    "src/mesh/mesh.h",
168    "src/mesh/mesh_creator.cpp",
169    "src/mesh/mesh_creator.h",
170    "src/mesh/mesh_resource.h",
171    "src/mesh/shader.cpp",
172    "src/mesh/shader.h",
173    "src/mesh/shader_util.cpp",
174    "src/mesh/submesh.cpp",
175    "src/mesh/submesh.h",
176    "src/mesh/texture.cpp",
177    "src/mesh/texture.h",
178    "src/node/camera_node.cpp",
179    "src/node/camera_node.h",
180    "src/node/light_node.cpp",
181    "src/node/light_node.h",
182    "src/node/mesh_node.cpp",
183    "src/node/node.cpp",
184    "src/node/node.h",
185    "src/node/text_node.cpp",
186    "src/node/text_node.h",
187    "src/nodel/mesh_node.h",
188    "src/plugin.cpp",
189    "src/postprocess/bloom.h",
190    "src/postprocess/postprocess.cpp",
191    "src/postprocess/postprocess.h",
192    "src/postprocess/tonemap.h",
193    "src/register_engine_access.cpp",
194    "src/render_configuration.cpp",
195    "src/render_configuration.h",
196    "src/scene.cpp",
197    "src/scene.h",
198    "src/scene_manager.cpp",
199    "src/scene_manager.h",
200    "src/util.h",
201  ]
202
203  include_dirs = [
204    "${LUME_BASE_PATH}/api",
205    "${LUME_CORE_PATH}/api",
206    "${LUME_RENDER_PATH}/api",
207    "${LUME_CORE3D_PATH}/api",
208    "${LUME_META_PATH}/include",
209  ]
210
211  deps = [
212    "${LUME_CORE_PATH}/ecshelper:libAGPEcshelper",
213    "${LUME_META_PATH}:libPluginMetaObject",
214  ]
215  external_deps = [ "c_utils:utils" ]
216  part_name = "graphic_3d"
217  subsystem_name = "graphic"
218}
219
220#ohos_static_library("libSceneWidget") {
221#  public_deps = [
222#    ":lume_scenewidget_src",
223#  ]
224#  part_name = "graphic_3d"
225#  subsystem_name = "graphic"
226#}
227
228ohos_shared_library("libPluginSceneWidget") {
229  deps = [
230    ":lume_scenewidget_src",
231    "${LUME_SERIALIZER_PATH}:EcsSerializer",
232  ]
233  relative_install_dir = "graphics3d"
234  part_name = "graphic_3d"
235  subsystem_name = "graphic"
236}
237