1# Copyright (c) 2024 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 "plugin/include", 20 "plugin/src", 21 ] 22 23 defines = [ 24 "__OHOS_PLATFORM__", 25 "CORE3D_PUBLIC=__attribute__((visibility(\"default\")))", 26 "CORE_USE_COMPILER_GENERATED_STATIC_LIST=1", 27 "CORE3D_SHARED_LIBRARY=1", 28 "CORE3D_VALIDATION_ENABLED=0", 29 "CORE3D_TESTS_ENABLED=0", 30 "CORE3D_DEV_ENABLED=${CORE_DEV_ENABLED}", 31 "CORE3D_PUBLIC=__attribute__((visibility(\"default\")))", 32 "CORE_USE_COMPILER_GENERATED_STATIC_LIST=1", 33 "CORE_STATIC_PLUGIN_HEADER=${CORE_STATIC_PLUGIN_HEADER }", 34 ] 35 36 cflags = [ 37 "-Wno-unused-function", 38 "-Wno-unused-parameter", 39 "-Wno-sign-compare", 40 "-Wno-unused-variable", 41 "-Wno-unused-private-field", 42 "-Wno-tautological-unsigned-zero-compare", 43 "-Wno-logical-op-parentheses", 44 "-Wno-unused-local-typedef", 45 46 "-fvisibility=hidden", 47 "-ffunction-sections", 48 "-fdata-sections", 49 "-Wno-ignored-qualifiers", 50 ] 51 52 cflags_cc = [ 53 "-std=c++17", 54 "-Wno-overloaded-virtual", 55 "-Wno-thread-safety-attributes", 56 "-Wno-missing-braces", 57 "-frtti", 58 ] 59} 60 61ohos_source_set("lume_scenewidget_src") { 62 public_configs = [ 63 ":lume_scenewidget_config", 64 "${LUME_RENDER_PATH}:lume_render_api", 65 "${LUME_CORE_PATH}:lume_base_api", 66 "${LUME_CORE_PATH}:lume_engine_api", 67 "${LUME_CORE_PATH}:lume_component_help_config", 68 "${LUME_CORE_PATH}:lume_default", 69 "${LUME_METAOBJECT_PATH}:lume_metaobject_config", 70 "${LUME_ECS_HELPER_PATH}:lume_engine_ecshelper_config", 71 ] 72 73 sources = [ 74 "plugin/src/PropertyHandlerArrayHolder.h", 75 "plugin/src/anim_impl.cpp", 76 "plugin/src/anim_impl.h", 77 "plugin/src/asset_loader.cpp", 78 "plugin/src/asset_loader.h", 79 "plugin/src/asset_manager.cpp", 80 "plugin/src/asset_manager.h", 81 "plugin/src/asset_migration.cpp", 82 "plugin/src/asset_migration.h", 83 "plugin/src/bind_templates.inl", 84 "plugin/src/camera_impl.cpp", 85 "plugin/src/camera_impl.h", 86 "plugin/src/component_dll.cpp", 87 "plugin/src/ecs_animation.cpp", 88 "plugin/src/ecs_animation.h", 89 "plugin/src/ecs_listener.h", 90 "plugin/src/ecs_object.cpp", 91 "plugin/src/ecs_serializer.cpp", 92 "plugin/src/ecs_serializer.h", 93 "plugin/src/ecs_util.h", 94 "plugin/src/entity_collection.cpp", 95 "plugin/src/entity_collection.h", 96 "plugin/src/env_impl.cpp", 97 "plugin/src/env_impl.h", 98 "plugin/src/graphicsstate_impl.cpp", 99 "plugin/src/graphicsstate_impl.h", 100 "plugin/src/hierarchy_controller.cpp", 101 "plugin/src/hierarchy_controller.h", 102 "plugin/src/intf_multi_mesh_initialization.h", 103 "plugin/src/intf_node_private.h", 104 "plugin/src/intf_postprocess_private.h", 105 "plugin/src/intf_resource_private.h", 106 "plugin/src/json.h", 107 "plugin/src/json_util.h", 108 "plugin/src/light_impl.cpp", 109 "plugin/src/light_impl.h", 110 "plugin/src/material_impl.cpp", 111 "plugin/src/material_impl.h", 112 "plugin/src/mesh_impl.cpp", 113 "plugin/src/mesh_impl.h", 114 "plugin/src/multimesh_impl.cpp", 115 "plugin/src/multimesh_impl.h", 116 "plugin/src/node_impl.cpp", 117 "plugin/src/node_impl.h", 118 "plugin/src/node_impl.h", 119 "plugin/src/postprocess_effect_impl.cpp", 120 "plugin/src/postprocess_effect_impl.h", 121 "plugin/src/postprocess_impl.cpp", 122 "plugin/src/postprocess_impl.h", 123 "plugin/src/propertyholder_impl.cpp", 124 "plugin/src/propertyholder_impl.h", 125 "plugin/src/register_engine_access.cpp", 126 "plugin/src/render_configuration_impl.cpp", 127 "plugin/src/render_configuration_impl.h", 128 "plugin/src/resource_container.cpp", 129 "plugin/src/resource_container.h", 130 "plugin/src/scene_holder.cpp", 131 "plugin/src/scene_holder.h", 132 "plugin/src/scene_impl.cpp", 133 "plugin/src/scene_nodes.cpp", 134 "plugin/src/shader_impl.cpp", 135 "plugin/src/shader_impl.h", 136 "plugin/src/submesh_impl.cpp", 137 "plugin/src/submesh_impl.h", 138 "plugin/src/submeshhandler.cpp", 139 "plugin/src/task_utils.h", 140 "plugin/src/textureinfo_impl.cpp", 141 "plugin/src/textureinfo_impl.h", 142 ] 143 144 include_dirs = [ 145 "${LUME_BASE_PATH}/api", 146 "${LUME_CORE_PATH}/api", 147 "${LUME_RENDER_PATH}/api", 148 "${LUME_CORE3D_PATH}/api", 149 "${LUME_METAOBJECT_PATH}/include", 150 ] 151 deps = [ 152 "${LUME_ECS_HELPER_PATH}:libAGPEcshelper", 153 "${LUME_METAOBJECT_PATH}:libPluginMetaObject", 154 ] 155 156 external_deps = [ "c_utils:utils" ] 157 part_name = "graphic_3d" 158 subsystem_name = "graphic" 159} 160 161ohos_static_library("libSceneWidget") { 162 public_deps = [ ":lume_scenewidget_src" ] 163 part_name = "graphic_3d" 164 subsystem_name = "graphic" 165} 166ohos_shared_library("libPluginSceneWidget") { 167 public_deps = [ ":libSceneWidget" ] 168 part_name = "graphic_3d" 169 subsystem_name = "graphic" 170} 171