• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2022 Huawei Technologies Co, Ltd.
3#
4
5project(LumeMetaPlugin LANGUAGES CXX)
6
7#
8# Plugin
9#
10set(PLUGIN_NAME LumeMeta)
11add_library(${PLUGIN_NAME} SHARED)
12add_library(${PLUGIN_NAME}::Plugin ALIAS ${PLUGIN_NAME})
13
14target_sources(${PLUGIN_NAME} PRIVATE
15    animation/animation.h
16    animation/animation_controller.cpp
17    animation/animation_controller.h
18    animation/animation_modifier.h
19    animation/animation_state.cpp
20    animation/animation_state.h
21    animation/interpolator.cpp
22    animation/interpolator.h
23    animation/intf_animation_internal.h
24    animation/keyframe_animation.cpp
25    animation/keyframe_animation.h
26    animation/modifiers/loop.cpp
27    animation/modifiers/loop.h
28    animation/modifiers/reverse.cpp
29    animation/modifiers/reverse.h
30    animation/modifiers/speed.cpp
31    animation/modifiers/speed.h
32    animation/parallel_animation.cpp
33    animation/parallel_animation.h
34    animation/property_animation.cpp
35    animation/property_animation.h
36    animation/sequential_animation.cpp
37    animation/sequential_animation.h
38    animation/staggered_animation_state.cpp
39    animation/staggered_animation_state.h
40    animation/track_animation.cpp
41    animation/track_animation.h
42    animation/track_animation_state.cpp
43    animation/track_animation_state.h
44    attachment_container.cpp
45    attachment_container.h
46    base_object.h
47    call_context.cpp
48    call_context.h
49    class_registry.cpp
50    class_registry.h
51    connector.cpp
52    connector.h
53    container/container.cpp
54    container/container.h
55    container/container_base.cpp
56    container/container_base.h
57    container/flat_container.cpp
58    container/flat_container.h
59    container/object_container.cpp
60    container/object_container.h
61    container/object_flat_container.cpp
62    container/object_flat_container.h
63    container_observer.cpp
64    container_observer.h
65    content_object.cpp
66    curves/bezier_curve.cpp
67    curves/bezier_curve.h
68    curves/easing_curve.cpp
69    curves/easing_curve.h
70    engine/engine_input_property_manager.cpp
71    engine/engine_input_property_manager.h
72    engine/engine_value.cpp
73    engine/engine_value.h
74    engine/engine_value_manager.cpp
75    engine/engine_value_manager.h
76    functions.cpp
77    functions.h
78    future.cpp
79    future.h
80    loaders/class_content_loader.cpp
81    loaders/class_content_loader.h
82    loaders/csv_parser.cpp
83    loaders/csv_parser.h
84    loaders/csv_string_resource_loader.cpp
85    loaders/csv_string_resource_loader.h
86    loaders/json_content_loader.cpp
87    loaders/json_content_loader.h
88    manual_clock.cpp
89    meta_object_lib.cpp
90    meta_object_lib.h
91    model/composite_object_provider.cpp
92    model/composite_object_provider.h
93    model/container_data_model.cpp
94    model/container_data_model.h
95    model/content_loader_object_provider.cpp
96    model/content_loader_object_provider.h
97    model/instantiating_object_provider.cpp
98    model/instantiating_object_provider.h
99    model/object_provider_base.cpp
100    model/object_provider_base.h
101    number.cpp
102    number.h
103    object.h
104    object_context.cpp
105    object_context.h
106    object_data_container.cpp
107    object_data_container.h
108    object_hierarchy_observer.cpp
109    object_hierarchy_observer.h
110    object_name.h
111    object_registry.cpp
112    object_registry.h
113    plugin.cpp
114    polling_task_queue.cpp
115    property/bind.cpp
116    property/bind.h
117    property/dependencies.cpp
118    property/dependencies.h
119    property/property.cpp
120    property/property.h
121    property/stack_property.cpp
122    property/stack_property.h
123    proxy_object.cpp
124    proxy_object.h
125    random.cpp
126    random.h
127    ref_uri_util.cpp
128    ref_uri_util.h
129    register_anys.cpp
130    register_default_anims.cpp
131    register_default_objs.cpp
132    register_engine_access.cpp
133    register_entities.cpp
134    register_value_serializers.cpp
135    serialization/backend/debug_output.cpp
136    serialization/backend/debug_output.h
137    serialization/backend/json_input.cpp
138    serialization/backend/json_input.h
139    serialization/backend/json_output.cpp
140    serialization/backend/json_output.h
141    serialization/exporter.cpp
142    serialization/exporter.h
143    serialization/importer.cpp
144    serialization/importer.h
145    serialization/json_exporter.cpp
146    serialization/json_exporter.h
147    serialization/json_importer.cpp
148    serialization/json_importer.h
149    serialization/metav1_compat.cpp
150    serialization/metav1_compat.h
151    startable_object_controller.cpp
152    startable_object_controller.h
153    system_clock.cpp
154    task_queue.h
155    threaded_task_queue.cpp
156    resource/file_resource_manager.h
157    resource/file_resource_manager.cpp
158    resource/object_resource.h
159    resource/object_resource.cpp
160)
161
162set_source_files_properties(register_default_props.cpp PROPERTIES COMPILE_FLAGS $<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/bigobj>)
163
164target_compile_definitions(${PLUGIN_NAME} PRIVATE CORE_PLUGIN=1)
165
166target_link_libraries(${PLUGIN_NAME} PRIVATE
167    ${PLUGIN_NAME}API
168    ${PLUGIN_NAME}ExtAPI
169    ${PLUGIN_NAME}HighLevelAPI
170)
171
172if(MSVC)
173    target_compile_options(${PLUGIN_NAME} PRIVATE /GR-)
174    if(CMAKE_CXX_FLAGS MATCHES "/EHs ")
175      string(REPLACE "/EHs" "/EHs-c- /D_HAS_EXCEPTIONS=0" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
176    endif()
177elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
178    target_compile_options(${PLUGIN_NAME} PRIVATE -Oz -fno-exceptions -fno-rtti)
179endif()
180
181# Utilize common linker flags from Base
182include(${BASE_ROOT_DIRECTORY}/cmake/cmake_tools.cmake)
183append_link_flags(${PLUGIN_NAME} "${BASE_SO_LINK_FLAGS}")
184
185# Code inspection
186include(LumeMetaTargetCodeInspection)
187meta_object_target_code_inspection(${PLUGIN_NAME})
188
189set_target_properties(${PLUGIN_NAME} PROPERTIES
190    CXX_STANDARD 17
191    CXX_EXTENSIONS off
192    CXX_VISIBILITY_PRESET hidden
193    VISIBILITY_INLINES_HIDDEN 1
194    OUTPUT_NAME Plugin${PLUGIN_NAME}
195)
196
197#
198# IDE project tree
199#
200get_target_property(IMPL_SOURCES ${PLUGIN_NAME} SOURCES)
201source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX src FILES ${IMPL_SOURCES})