18bf80f4bSopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd.
28bf80f4bSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
38bf80f4bSopenharmony_ci# you may not use this file except in compliance with the License.
48bf80f4bSopenharmony_ci# You may obtain a copy of the License at
58bf80f4bSopenharmony_ci#
68bf80f4bSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
78bf80f4bSopenharmony_ci#
88bf80f4bSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
98bf80f4bSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
108bf80f4bSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
118bf80f4bSopenharmony_ci# See the License for the specific language governing permissions and
128bf80f4bSopenharmony_ci# limitations under the License.
138bf80f4bSopenharmony_ci
148bf80f4bSopenharmony_ciimport("//build/ohos.gni")
158bf80f4bSopenharmony_ciimport("//foundation/graphic/graphic_3d/lume/lume_config.gni")
168bf80f4bSopenharmony_ci
178bf80f4bSopenharmony_ciconfig("lume_scenewidget_config") {
188bf80f4bSopenharmony_ci  include_dirs = [
198bf80f4bSopenharmony_ci    "plugin/include",
208bf80f4bSopenharmony_ci    "plugin/src",
218bf80f4bSopenharmony_ci  ]
228bf80f4bSopenharmony_ci
238bf80f4bSopenharmony_ci  defines = [
248bf80f4bSopenharmony_ci    "__OHOS_PLATFORM__",
258bf80f4bSopenharmony_ci    "CORE3D_PUBLIC=__attribute__((visibility(\"default\")))",
268bf80f4bSopenharmony_ci    "CORE_USE_COMPILER_GENERATED_STATIC_LIST=1",
278bf80f4bSopenharmony_ci    "CORE3D_SHARED_LIBRARY=1",
288bf80f4bSopenharmony_ci    "CORE3D_VALIDATION_ENABLED=0",
298bf80f4bSopenharmony_ci    "CORE3D_TESTS_ENABLED=0",
308bf80f4bSopenharmony_ci    "CORE3D_DEV_ENABLED=${CORE_DEV_ENABLED}",
318bf80f4bSopenharmony_ci    "CORE3D_PUBLIC=__attribute__((visibility(\"default\")))",
328bf80f4bSopenharmony_ci    "CORE_USE_COMPILER_GENERATED_STATIC_LIST=1",
338bf80f4bSopenharmony_ci    "CORE_STATIC_PLUGIN_HEADER=${CORE_STATIC_PLUGIN_HEADER }",
348bf80f4bSopenharmony_ci  ]
358bf80f4bSopenharmony_ci
368bf80f4bSopenharmony_ci  cflags = [
378bf80f4bSopenharmony_ci    "-Wno-unused-function",
388bf80f4bSopenharmony_ci    "-Wno-unused-parameter",
398bf80f4bSopenharmony_ci    "-Wno-sign-compare",
408bf80f4bSopenharmony_ci    "-Wno-unused-variable",
418bf80f4bSopenharmony_ci    "-Wno-unused-private-field",
428bf80f4bSopenharmony_ci    "-Wno-tautological-unsigned-zero-compare",
438bf80f4bSopenharmony_ci    "-Wno-logical-op-parentheses",
448bf80f4bSopenharmony_ci    "-Wno-unused-local-typedef",
458bf80f4bSopenharmony_ci
468bf80f4bSopenharmony_ci    "-fvisibility=hidden",
478bf80f4bSopenharmony_ci    "-ffunction-sections",
488bf80f4bSopenharmony_ci    "-fdata-sections",
498bf80f4bSopenharmony_ci    "-Wno-ignored-qualifiers",
508bf80f4bSopenharmony_ci  ]
518bf80f4bSopenharmony_ci
528bf80f4bSopenharmony_ci  cflags_cc = [
538bf80f4bSopenharmony_ci    "-std=c++17",
548bf80f4bSopenharmony_ci    "-Wno-overloaded-virtual",
558bf80f4bSopenharmony_ci    "-Wno-thread-safety-attributes",
568bf80f4bSopenharmony_ci    "-Wno-missing-braces",
578bf80f4bSopenharmony_ci    "-frtti",
588bf80f4bSopenharmony_ci  ]
598bf80f4bSopenharmony_ci}
608bf80f4bSopenharmony_ci
618bf80f4bSopenharmony_ciohos_source_set("lume_scenewidget_src") {
628bf80f4bSopenharmony_ci  public_configs = [
638bf80f4bSopenharmony_ci    ":lume_scenewidget_config",
648bf80f4bSopenharmony_ci    "${LUME_RENDER_PATH}:lume_render_api",
658bf80f4bSopenharmony_ci    "${LUME_CORE_PATH}:lume_base_api",
668bf80f4bSopenharmony_ci    "${LUME_CORE_PATH}:lume_engine_api",
678bf80f4bSopenharmony_ci    "${LUME_CORE_PATH}:lume_component_help_config",
688bf80f4bSopenharmony_ci    "${LUME_CORE_PATH}:lume_default",
698bf80f4bSopenharmony_ci    "${LUME_METAOBJECT_PATH}:lume_metaobject_config",
708bf80f4bSopenharmony_ci    "${LUME_ECS_HELPER_PATH}:lume_engine_ecshelper_config",
718bf80f4bSopenharmony_ci  ]
728bf80f4bSopenharmony_ci
738bf80f4bSopenharmony_ci  sources = [
748bf80f4bSopenharmony_ci    "plugin/src/PropertyHandlerArrayHolder.h",
758bf80f4bSopenharmony_ci    "plugin/src/anim_impl.cpp",
768bf80f4bSopenharmony_ci    "plugin/src/anim_impl.h",
778bf80f4bSopenharmony_ci    "plugin/src/asset_loader.cpp",
788bf80f4bSopenharmony_ci    "plugin/src/asset_loader.h",
798bf80f4bSopenharmony_ci    "plugin/src/asset_manager.cpp",
808bf80f4bSopenharmony_ci    "plugin/src/asset_manager.h",
818bf80f4bSopenharmony_ci    "plugin/src/asset_migration.cpp",
828bf80f4bSopenharmony_ci    "plugin/src/asset_migration.h",
838bf80f4bSopenharmony_ci    "plugin/src/bind_templates.inl",
848bf80f4bSopenharmony_ci    "plugin/src/camera_impl.cpp",
858bf80f4bSopenharmony_ci    "plugin/src/camera_impl.h",
868bf80f4bSopenharmony_ci    "plugin/src/component_dll.cpp",
878bf80f4bSopenharmony_ci    "plugin/src/ecs_animation.cpp",
888bf80f4bSopenharmony_ci    "plugin/src/ecs_animation.h",
898bf80f4bSopenharmony_ci    "plugin/src/ecs_listener.h",
908bf80f4bSopenharmony_ci    "plugin/src/ecs_object.cpp",
918bf80f4bSopenharmony_ci    "plugin/src/ecs_serializer.cpp",
928bf80f4bSopenharmony_ci    "plugin/src/ecs_serializer.h",
938bf80f4bSopenharmony_ci    "plugin/src/ecs_util.h",
948bf80f4bSopenharmony_ci    "plugin/src/entity_collection.cpp",
958bf80f4bSopenharmony_ci    "plugin/src/entity_collection.h",
968bf80f4bSopenharmony_ci    "plugin/src/env_impl.cpp",
978bf80f4bSopenharmony_ci    "plugin/src/env_impl.h",
988bf80f4bSopenharmony_ci    "plugin/src/graphicsstate_impl.cpp",
998bf80f4bSopenharmony_ci    "plugin/src/graphicsstate_impl.h",
1008bf80f4bSopenharmony_ci    "plugin/src/hierarchy_controller.cpp",
1018bf80f4bSopenharmony_ci    "plugin/src/hierarchy_controller.h",
1028bf80f4bSopenharmony_ci    "plugin/src/intf_multi_mesh_initialization.h",
1038bf80f4bSopenharmony_ci    "plugin/src/intf_node_private.h",
1048bf80f4bSopenharmony_ci    "plugin/src/intf_postprocess_private.h",
1058bf80f4bSopenharmony_ci    "plugin/src/intf_resource_private.h",
1068bf80f4bSopenharmony_ci    "plugin/src/json.h",
1078bf80f4bSopenharmony_ci    "plugin/src/json_util.h",
1088bf80f4bSopenharmony_ci    "plugin/src/light_impl.cpp",
1098bf80f4bSopenharmony_ci    "plugin/src/light_impl.h",
1108bf80f4bSopenharmony_ci    "plugin/src/material_impl.cpp",
1118bf80f4bSopenharmony_ci    "plugin/src/material_impl.h",
1128bf80f4bSopenharmony_ci    "plugin/src/mesh_impl.cpp",
1138bf80f4bSopenharmony_ci    "plugin/src/mesh_impl.h",
1148bf80f4bSopenharmony_ci    "plugin/src/multimesh_impl.cpp",
1158bf80f4bSopenharmony_ci    "plugin/src/multimesh_impl.h",
1168bf80f4bSopenharmony_ci    "plugin/src/node_impl.cpp",
1178bf80f4bSopenharmony_ci    "plugin/src/node_impl.h",
1188bf80f4bSopenharmony_ci    "plugin/src/node_impl.h",
1198bf80f4bSopenharmony_ci    "plugin/src/postprocess_effect_impl.cpp",
1208bf80f4bSopenharmony_ci    "plugin/src/postprocess_effect_impl.h",
1218bf80f4bSopenharmony_ci    "plugin/src/postprocess_impl.cpp",
1228bf80f4bSopenharmony_ci    "plugin/src/postprocess_impl.h",
1238bf80f4bSopenharmony_ci    "plugin/src/propertyholder_impl.cpp",
1248bf80f4bSopenharmony_ci    "plugin/src/propertyholder_impl.h",
1258bf80f4bSopenharmony_ci    "plugin/src/register_engine_access.cpp",
1268bf80f4bSopenharmony_ci    "plugin/src/render_configuration_impl.cpp",
1278bf80f4bSopenharmony_ci    "plugin/src/render_configuration_impl.h",
1288bf80f4bSopenharmony_ci    "plugin/src/resource_container.cpp",
1298bf80f4bSopenharmony_ci    "plugin/src/resource_container.h",
1308bf80f4bSopenharmony_ci    "plugin/src/scene_holder.cpp",
1318bf80f4bSopenharmony_ci    "plugin/src/scene_holder.h",
1328bf80f4bSopenharmony_ci    "plugin/src/scene_impl.cpp",
1338bf80f4bSopenharmony_ci    "plugin/src/scene_nodes.cpp",
1348bf80f4bSopenharmony_ci    "plugin/src/shader_impl.cpp",
1358bf80f4bSopenharmony_ci    "plugin/src/shader_impl.h",
1368bf80f4bSopenharmony_ci    "plugin/src/submesh_impl.cpp",
1378bf80f4bSopenharmony_ci    "plugin/src/submesh_impl.h",
1388bf80f4bSopenharmony_ci    "plugin/src/submeshhandler.cpp",
1398bf80f4bSopenharmony_ci    "plugin/src/task_utils.h",
1408bf80f4bSopenharmony_ci    "plugin/src/textureinfo_impl.cpp",
1418bf80f4bSopenharmony_ci    "plugin/src/textureinfo_impl.h",
1428bf80f4bSopenharmony_ci  ]
1438bf80f4bSopenharmony_ci
1448bf80f4bSopenharmony_ci  include_dirs = [
1458bf80f4bSopenharmony_ci    "${LUME_BASE_PATH}/api",
1468bf80f4bSopenharmony_ci    "${LUME_CORE_PATH}/api",
1478bf80f4bSopenharmony_ci    "${LUME_RENDER_PATH}/api",
1488bf80f4bSopenharmony_ci    "${LUME_CORE3D_PATH}/api",
1498bf80f4bSopenharmony_ci    "${LUME_METAOBJECT_PATH}/include",
1508bf80f4bSopenharmony_ci  ]
1518bf80f4bSopenharmony_ci  deps = [
1528bf80f4bSopenharmony_ci    "${LUME_ECS_HELPER_PATH}:libAGPEcshelper",
1538bf80f4bSopenharmony_ci    "${LUME_METAOBJECT_PATH}:libPluginMetaObject",
1548bf80f4bSopenharmony_ci  ]
1558bf80f4bSopenharmony_ci
1568bf80f4bSopenharmony_ci  external_deps = [ "c_utils:utils" ]
1578bf80f4bSopenharmony_ci  part_name = "graphic_3d"
1588bf80f4bSopenharmony_ci  subsystem_name = "graphic"
1598bf80f4bSopenharmony_ci}
1608bf80f4bSopenharmony_ci
1618bf80f4bSopenharmony_ciohos_static_library("libSceneWidget") {
1628bf80f4bSopenharmony_ci  public_deps = [ ":lume_scenewidget_src" ]
1638bf80f4bSopenharmony_ci  part_name = "graphic_3d"
1648bf80f4bSopenharmony_ci  subsystem_name = "graphic"
1658bf80f4bSopenharmony_ci}
1668bf80f4bSopenharmony_ciohos_shared_library("libPluginSceneWidget") {
1678bf80f4bSopenharmony_ci  public_deps = [ ":libSceneWidget" ]
1688bf80f4bSopenharmony_ci  part_name = "graphic_3d"
1698bf80f4bSopenharmony_ci  subsystem_name = "graphic"
1708bf80f4bSopenharmony_ci}
171