• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2022 Huawei Technologies Co, Ltd.
3#
4
5project(LumeScenePlugin LANGUAGES CXX)
6
7#
8# Dependencies
9#
10if (NOT TARGET AGP3DAPI)
11    find_package(AGP3DAPI REQUIRED)
12endif()
13if (NOT TARGET PluginFontAPI)
14    find_package(PluginFontAPI REQUIRED)
15endif()
16if (NOT TARGET AGP3DTextAPI)
17    find_package(AGP3DTextAPI REQUIRED)
18endif()
19if (NOT TARGET AGPEngine::ComponentHelperSDK)
20    find_package(ComponentHelperSDK REQUIRED)
21endif()
22if (NOT TARGET LumeMeta::HighLevelAPI)
23    find_package(LumeMetaHighLevelAPI REQUIRED)
24endif()
25if (NOT TARGET LumeMeta::ExtAPI)
26    find_package(LumeMetaExtAPI REQUIRED)
27endif()
28
29#
30# Plugin
31#
32set(PLUGIN_NAME LumeScene)
33add_library(${PLUGIN_NAME} SHARED)
34add_library(${PLUGIN_NAME}::Plugin ALIAS ${PLUGIN_NAME})
35
36target_sources(${PLUGIN_NAME} PRIVATE
37    asset/asset_object.cpp
38    asset/asset_object.h
39    component/animation_component.cpp
40    component/animation_component.h
41    component/camera_component.cpp
42    component/camera_component.h
43    component/environment_component.cpp
44    component/environment_component.h
45    component/generic_component.cpp
46    component/generic_component.h
47    component/layer_component.cpp
48    component/layer_component.h
49    component/light_component.cpp
50    component/light_component.h
51    component/material_component.cpp
52    component/material_component.h
53    component/mesh_component.cpp
54    component/mesh_component.h
55    component/node_component.cpp
56    component/node_component.h
57    component/postprocess_component.cpp
58    component/postprocess_component.h
59    component/text_component.cpp
60    component/text_component.h
61    component/transform_component.cpp
62    component/transform_component.h
63    component_factory.h
64    core/camera.cpp
65    core/camera.h
66    core/ecs.cpp
67    core/ecs.h
68    core/ecs_listener.cpp
69    core/ecs_listener.h
70    core/ecs_object.cpp
71    core/ecs_object.h
72    core/internal_scene.cpp
73    core/internal_scene.h
74    core/intf_internal_raycast.h
75    ecs_component/entity_owner_component.h
76    ecs_component/entity_owner_component_manager.cpp
77    mesh/mesh.cpp
78    mesh/mesh.h
79    mesh/mesh_creator.cpp
80    mesh/mesh_creator.h
81    mesh/mesh_resource.h
82    mesh/submesh.cpp
83    mesh/submesh.h
84    mesh/texture.cpp
85    mesh/texture.h
86    mesh/sampler.cpp
87    mesh/sampler.h
88    node/camera_node.cpp
89    node/camera_node.h
90    node/light_node.cpp
91    node/light_node.h
92    node/mesh_node.cpp
93    node/mesh_node.h
94    node/node.cpp
95    node/node.h
96    node/startable_handler.cpp
97    node/startable_handler.h
98    node/text_node.cpp
99    node/text_node.h
100    plugin.cpp
101    postprocess/bloom.cpp
102    postprocess/bloom.h
103    postprocess/postprocess.cpp
104    postprocess/postprocess.h
105    postprocess/tonemap.cpp
106    postprocess/tonemap.h
107    postprocess/util.h
108    register_anys.cpp
109    register_engine_access.cpp
110    register_serializers.cpp
111    render_configuration.cpp
112    render_configuration.h
113    render_context.h
114    resource/ecs_animation.cpp
115    resource/ecs_animation.h
116    resource/environment.cpp
117    resource/environment.h
118    resource/image.cpp
119    resource/image.h
120    resource/material.cpp
121    resource/material.h
122    resource/render_resource.cpp
123    resource/render_resource.h
124    resource/render_resource_manager.cpp
125    resource/render_resource_manager.h
126    resource/resource_types.cpp
127    resource/resource_types.h
128    resource/shader.cpp
129    resource/shader.h
130    resource/types/animation_type.cpp
131    resource/types/animation_type.h
132    resource/types/environment_type.cpp
133    resource/types/environment_type.h
134    resource/types/gltf_scene_type.cpp
135    resource/types/gltf_scene_type.h
136    resource/types/image_type.cpp
137    resource/types/image_type.h
138    resource/types/material_type.cpp
139    resource/types/material_type.h
140    resource/types/postprocess_type.cpp
141    resource/types/postprocess_type.h
142    resource/types/scene_type.cpp
143    resource/types/scene_type.h
144    resource/types/shader_type.cpp
145    resource/types/shader_type.h
146    scene.cpp
147    scene.h
148    scene_manager.cpp
149    scene_manager.h
150    serialization/external_node.h
151    serialization/scene_exporter.cpp
152    serialization/scene_exporter.h
153    serialization/scene_importer.cpp
154    serialization/scene_importer.h
155    util.h
156)
157
158set_source_files_properties(plugin.cpp PROPERTIES COMPILE_FLAGS $<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/bigobj>)
159
160target_compile_definitions(${PLUGIN_NAME} PRIVATE CORE_PLUGIN=1)
161
162target_link_libraries(${PLUGIN_NAME} PRIVATE
163    ${PLUGIN_NAME}::API
164    AGPEngine::ComponentHelperSDK
165    AGPRender::AGPRenderAPI
166    AGP3D::AGP3DAPI
167    LumeMeta::ExtAPI
168    EcsSerializer
169    RuntimeUtil
170    AGP3DText::AGP3DTextAPI
171    PluginFont::PluginFontAPI
172)
173
174set_target_properties(${PLUGIN_NAME} PROPERTIES
175    CXX_STANDARD 17
176    CXX_EXTENSIONS off
177    CXX_VISIBILITY_PRESET hidden
178    VISIBILITY_INLINES_HIDDEN 1
179    OUTPUT_NAME Plugin${PLUGIN_NAME}
180)
181
182#
183# IDE project tree
184#
185get_target_property(IMPL_SOURCES ${PLUGIN_NAME} SOURCES)
186source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX src FILES ${IMPL_SOURCES})
187