• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2021 Huawei Technologies Co, Ltd.
3#
4
5#
6# Plugin library.
7#
8
9if (NOT TARGET AGP3DAPI)
10    find_package(AGP3DAPI REQUIRED)
11endif()
12if (NOT TARGET PluginFontAPI)
13    find_package(PluginFontAPI REQUIRED)
14endif()
15if (NOT TARGET AGP3DTextAPI)
16    find_package(AGP3DTextAPI REQUIRED)
17endif()
18if (NOT TARGET AGPEngine::ComponentHelperSDK)
19    find_package(ComponentHelperSDK REQUIRED)
20endif()
21
22add_library(ScenePlugin SHARED)
23
24target_sources(ScenePlugin PRIVATE
25    asset/asset_object.cpp
26    asset/asset_object.h
27    bitmap.cpp
28    bitmap.h
29    component/animation_component.cpp
30    component/animation_component.h
31    component/camera_component.cpp
32    component/camera_component.h
33    component/environment_component.cpp
34    component/environment_component.h
35    component/generic_component.cpp
36    component/generic_component.h
37    component/layer_component.cpp
38    component/layer_component.h
39    component/light_component.cpp
40    component/light_component.h
41    component/material_component.cpp
42    component/material_component.h
43    component/mesh_component.cpp
44    component/mesh_component.h
45    component/node_component.cpp
46    component/node_component.h
47    component/postprocess_component.cpp
48    component/postprocess_component.h
49    component/text_component.cpp
50    component/text_component.h
51    component/transform_component.cpp
52    component/transform_component.h
53    component_factory.h
54    core/camera.cpp
55    core/camera.h
56    core/ecs.cpp
57    core/ecs.h
58    core/ecs_listener.cpp
59    core/ecs_listener.h
60    core/ecs_object.cpp
61    core/ecs_object.h
62    core/internal_scene.cpp
63    core/internal_scene.h
64    ecs_animation.cpp
65    ecs_animation.h
66    environment.cpp
67    environment.h
68    mesh/material.cpp
69    mesh/material.h
70    mesh/mesh.cpp
71    mesh/mesh.h
72    mesh/mesh_creator.cpp
73    mesh/mesh_creator.h
74    mesh/mesh_resource.h
75    mesh/shader.cpp
76    mesh/shader.h
77    mesh/submesh.cpp
78    mesh/submesh.h
79    mesh/texture.cpp
80    mesh/texture.h
81    node/camera_node.cpp
82    node/camera_node.h
83    node/light_node.cpp
84    node/light_node.h
85    node/mesh_node.cpp
86    node/mesh_node.h
87    node/node.cpp
88    node/node.h
89    node/text_node.cpp
90    node/text_node.h
91    plugin.cpp
92    postprocess/bloom.h
93    postprocess/postprocess.cpp
94    postprocess/postprocess.h
95    postprocess/tonemap.h
96    register_engine_access.cpp
97    render_configuration.cpp
98    render_configuration.h
99    scene.cpp
100    scene.h
101    scene_manager.cpp
102    scene_manager.h
103    util.h
104)
105
106set_source_files_properties(plugin.cpp PROPERTIES COMPILE_FLAGS $<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/bigobj>)
107
108target_compile_definitions(ScenePlugin PRIVATE CORE_PLUGIN=1)
109
110target_link_libraries(ScenePlugin PRIVATE
111    Scene::API
112    MetaObject::ExtAPI
113    AGPRender::AGPRenderAPI
114    AGP3D::AGP3DAPI
115    AGPEngine::ComponentHelperSDK
116    EcsSerializer
117    RuntimeUtil
118    AGP3DText::AGP3DTextAPI
119    PluginFont::PluginFontAPI
120)
121set_target_properties(ScenePlugin PROPERTIES
122    CXX_STANDARD 17
123    CXX_EXTENSIONS off
124    CXX_VISIBILITY_PRESET hidden
125    VISIBILITY_INLINES_HIDDEN 1
126    OUTPUT_NAME PluginScene)
127