From 36892c593aaee042cef7be2d6202650e7a7df514 Mon Sep 17 00:00:00 2001 From: Nor-s Date: Tue, 1 Sep 2026 23:28:15 +0900 Subject: [PATCH] build: skip Lottie expression examples when unsupported Check for Lottie expression support separately from the base Lottie module so non-expression examples can still be built. --- src/meson.build | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/meson.build b/src/meson.build index 68ce5d2..7417908 100644 --- a/src/meson.build +++ b/src/meson.build @@ -101,12 +101,27 @@ if cc.links(lottie_example, dependencies : thorvg_dep, include_directories : tho 'Lottie.cpp', 'LottieAssetResolver.cpp', 'LottieAudio.cpp', - 'LottieExpressions.cpp', - 'LottieInteraction.cpp', - 'LottieSlot.cpp', 'LottieTweening.cpp' ] message('ThorVG Lottie found. Enabled Lottie examples.') + + lottie_expressions_example = ''' + #include + int main(int argc, char **argv) { + return tvg::LottieAnimation::expressions() ? 0 : 1; + } + ''' + + if cc.links(lottie_expressions_example, dependencies : thorvg_dep, include_directories : thorvg_inc) + source_file += [ + 'LottieExpressions.cpp', + 'LottieInteraction.cpp', + 'LottieSlot.cpp' + ] + message('ThorVG Lottie expressions found. Enabled Lottie expression examples.') + else + message('ThorVG Lottie expressions not found. Skipping Lottie expression examples.') + endif else message('ThorVG Lottie not found. Skipping Lottie examples.') endif