-
Notifications
You must be signed in to change notification settings - Fork 330
/
Copy pathCMakeLists.txt
201 lines (169 loc) · 6.47 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CORE_DIR glaxnimate/src/core/)
set(APP_DIR glaxnimate/external/QtAppSetup/src/)
set(GLAX_SOURCES
${APP_DIR}app/application.cpp
${APP_DIR}app/settings/settings_group.cpp
${APP_DIR}app/settings/settings.cpp
${APP_DIR}app/settings/palette_settings.cpp
${APP_DIR}app/settings/keyboard_shortcuts.cpp
${APP_DIR}app/settings/keyboard_shortcuts_model.cpp
${APP_DIR}app/translation_service.cpp
${APP_DIR}app/scripting/script_engine.cpp
${APP_DIR}app/widgets/settings_dialog.cpp
${APP_DIR}app/widgets/settings_dialog.ui
${APP_DIR}app/widgets/widget_palette_editor.cpp
${APP_DIR}app/widgets/widget_palette_editor.ui
${APP_DIR}app/widgets/clearable_keysequence_edit.cpp
${APP_DIR}app/widgets/clearable_keysequence_edit.ui
${APP_DIR}app/widgets/keyboard_settings_widget.cpp
${APP_DIR}app/widgets/keyboard_settings_widget.ui
${APP_DIR}app/log/logger.cpp
${APP_DIR}app/log/log_model.cpp
${APP_DIR}app/cli.cpp
${CORE_DIR}app_info.cpp
${CORE_DIR}command/structure_commands.cpp
${CORE_DIR}command/shape_commands.cpp
${CORE_DIR}command/animation_commands.cpp
${CORE_DIR}io/lottie/lottie_format.cpp
${CORE_DIR}io/lottie/lottie_html_format.cpp
${CORE_DIR}io/lottie/tgs_format.cpp
${CORE_DIR}io/lottie/cbor_write_json.cpp
${CORE_DIR}io/lottie/validation.cpp
${CORE_DIR}io/glaxnimate/glaxnimate_format.cpp
${CORE_DIR}io/glaxnimate/glaxnimate_importer.cpp
${CORE_DIR}io/glaxnimate/glaxnimate_mime.cpp
${CORE_DIR}io/svg/svg_renderer.cpp
${CORE_DIR}io/svg/svg_parser.cpp
${CORE_DIR}io/svg/detail.cpp
${CORE_DIR}io/svg/svg_format.cpp
${CORE_DIR}io/mime/mime_serializer.cpp
${CORE_DIR}io/raster/raster_format.cpp
${CORE_DIR}io/base.cpp
${CORE_DIR}math/geom.cpp
${CORE_DIR}math/polynomial.cpp
${CORE_DIR}math/ellipse_solver.cpp
${CORE_DIR}math/bezier/bezier.cpp
${CORE_DIR}math/bezier/point.cpp
${CORE_DIR}math/bezier/operations.cpp
${CORE_DIR}math/bezier/cubic_struts.cpp
${CORE_DIR}math/bezier/meta.cpp
${CORE_DIR}math/bezier/bezier_length.cpp
${CORE_DIR}model/main_composition.cpp
${CORE_DIR}model/composition.cpp
${CORE_DIR}model/document.cpp
${CORE_DIR}model/document_node.cpp
${CORE_DIR}model/object.cpp
${CORE_DIR}model/transform.cpp
${CORE_DIR}model/factory.cpp
${CORE_DIR}model/animation_container.cpp
${CORE_DIR}model/stretchable_time.cpp
${CORE_DIR}model/comp_graph.cpp
${CORE_DIR}model/mask_settings.cpp
${CORE_DIR}model/visitor.cpp
${CORE_DIR}model/custom_font.cpp
${CORE_DIR}model/animation/keyframe_transition.cpp
${CORE_DIR}model/animation/animatable.cpp
${CORE_DIR}model/animation/animatable_path.cpp
${CORE_DIR}model/property/property.cpp
${CORE_DIR}model/property/reference_property.cpp
${CORE_DIR}model/property/option_list_property.cpp
${CORE_DIR}model/assets/assets.cpp
${CORE_DIR}model/assets/brush_style.cpp
${CORE_DIR}model/assets/named_color.cpp
${CORE_DIR}model/assets/bitmap.cpp
${CORE_DIR}model/assets/gradient.cpp
${CORE_DIR}model/assets/asset_base.cpp
${CORE_DIR}model/assets/asset.cpp
${CORE_DIR}model/assets/precomposition.cpp
${CORE_DIR}model/assets/embedded_font.cpp
${CORE_DIR}model/shapes/shape.cpp
${CORE_DIR}model/shapes/fill.cpp
${CORE_DIR}model/shapes/rect.cpp
${CORE_DIR}model/shapes/group.cpp
${CORE_DIR}model/shapes/ellipse.cpp
${CORE_DIR}model/shapes/path.cpp
${CORE_DIR}model/shapes/stroke.cpp
${CORE_DIR}model/shapes/polystar.cpp
${CORE_DIR}model/shapes/styler.cpp
${CORE_DIR}model/shapes/layer.cpp
${CORE_DIR}model/shapes/image.cpp
${CORE_DIR}model/shapes/precomp_layer.cpp
${CORE_DIR}model/shapes/text.cpp
${CORE_DIR}model/shapes/repeater.cpp
${CORE_DIR}model/shapes/trim.cpp
${CORE_DIR}model/shapes/inflate_deflate.cpp
${CORE_DIR}model/shapes/path_modifier.cpp
${CORE_DIR}model/shapes/round_corners.cpp
${CORE_DIR}model/shapes/offset_path.cpp
${CORE_DIR}model/shapes/zig_zag.cpp
${CORE_DIR}plugin/plugin.cpp
${CORE_DIR}plugin/action.cpp
${CORE_DIR}plugin/io.cpp
${CORE_DIR}utils/gzip.cpp
${CORE_DIR}utils/tar.cpp
)
file(GLOB YML "*.yml")
add_custom_target(Other_glaxnimate_Files SOURCES
${YML}
)
function(mlt_add_glaxnimate_module ARG_TARGET)
cmake_parse_arguments(PARSE_ARGV 1 ARG "" "QT_VERSION;DATADIR" "")
if ("${ARG_TARGET}" STREQUAL "")
message(FATAL_ERROR "mlt_add_glaxnimate_module called without a valid target name.")
endif()
if (NOT (("${ARG_QT_VERSION}" STREQUAL "5") OR ("${ARG_QT_VERSION}" STREQUAL "6")))
message(FATAL_ERROR "mlt_add_glaxnimate_module called without a valid Qt Version (allowed are 5 or 6).")
endif()
if ("${ARG_DATADIR}" STREQUAL "")
message(FATAL_ERROR "mlt_add_glaxnimate_module called without a valid data dir name.")
endif()
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/${CORE_DIR}application_info_generated.in.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/${CORE_DIR}application_info_generated.hpp"
)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/${APP_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/${CORE_DIR})
include_directories(${LibArchive_INCLUDE_DIRS})
add_library(${ARG_TARGET} MODULE
producer_glaxnimate.cpp
${GLAX_SOURCES}
)
target_compile_options(${ARG_TARGET} PRIVATE ${MLT_COMPILE_OPTIONS})
add_definitions(-DWITHOUT_POTRACE -DWITHOUT_QT_COLOR_WIDGETS)
find_package(LibArchive REQUIRED)
find_package(ZLIB REQUIRED)
set_property(TARGET ${ARG_TARGET} APPEND PROPERTY AUTOMOC_MACRO_NAMES "GLAXNIMATE_OBJECT")
target_link_libraries(${ARG_TARGET} PRIVATE
mlt++
mlt
m
Threads::Threads
Qt${ARG_QT_VERSION}::Core
Qt${ARG_QT_VERSION}::Gui
Qt${ARG_QT_VERSION}::Widgets
Qt${ARG_QT_VERSION}::Xml
${LibArchive_LIBRARIES}
ZLIB::ZLIB
)
if(NOT WINDOWS_DEPLOY)
target_compile_definitions(${ARG_TARGET} PRIVATE NODEPLOY)
endif()
set_target_properties(${ARG_TARGET} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${MLT_MODULE_OUTPUT_DIRECTORY}")
install(TARGETS ${ARG_TARGET} LIBRARY DESTINATION ${MLT_INSTALL_MODULE_DIR})
install(FILES
producer_glaxnimate.yml
DESTINATION ${MLT_INSTALL_DATA_DIR}/${ARG_DATADIR}
)
endfunction()
if(MOD_GLAXNIMATE)
mlt_add_glaxnimate_module(mltglaxnimate QT_VERSION 5 DATADIR glaxnimate)
endif()
#if(MOD_GLAXNIMATE_QT6)
#mlt_add_glaxnimate_module(mltglaxnimate-qt6 QT_VERSION 6 DATADIR glaxnimate-qt6)
#endif()