@@ -165,34 +165,28 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
165165endif ()
166166
167167
168- # The onboarding animations are plain QML generated from the Lottie JSON. When
169- # the Qt lottietoqml generator is available (Qt 6.11+) we regenerate it at build
170- # time; otherwise we fall back to the checked-in copies under animations/. Either
171- # way no Lottie runtime is bundled.
168+ # The onboarding animations are plain QML generated from the Lottie JSON at build
169+ # time by the Qt6::lottietoqml tool. No Lottie runtime is bundled.
172170include (${CMAKE_SOURCE_DIR } /src/cmake/lottietoqml.cmake )
173171find_package (Qt6 QUIET COMPONENTS LottieTools )
174- if (TARGET Qt6::lottietoqml)
175- message (STATUS "Onboarding animations: regenerating QML from Lottie JSON with Qt6::lottietoqml" )
176- mz_target_qml_from_lottie (
177- mozillavpn-ui
178- FILES
179- resources/animations/globe_animation.json
180- resources/animations/lock_animation.json
181- resources/animations/vpnactive_animation.json
182- resources/animations/vpnlogo-drop_animation.json
183- OUTPUTS
184- animations/GlobeAnimation.qml
185- animations/LockAnimation.qml
186- animations/VpnActiveAnimation.qml
187- animations/VpnLogoDropAnimation.qml
188- )
189- else ()
190- message (STATUS "Onboarding animations: Qt6::lottietoqml not found, using checked-in QML under src/ui/animations/" )
191- qt_target_qml_sources (mozillavpn-ui
192- QML_FILES
193- animations/GlobeAnimation.qml
194- animations/LockAnimation.qml
195- animations/VpnActiveAnimation.qml
196- animations/VpnLogoDropAnimation.qml
197- )
198- endif ()
172+ if (NOT TARGET Qt6::lottietoqml)
173+ message (FATAL_ERROR
174+ "Qt6::lottietoqml not found. It is required to generate the onboarding "
175+ "animations from Lottie JSON. Install the Qt Lottie tools in the toolchain "
176+ "(note: finding the LottieTools package is not enough - the generator tool "
177+ "ships separately)." )
178+ endif ()
179+ message (STATUS "Onboarding animations: regenerating QML from Lottie JSON with Qt6::lottietoqml" )
180+ mz_target_qml_from_lottie (
181+ mozillavpn-ui
182+ FILES
183+ resources/animations/globe_animation.json
184+ resources/animations/lock_animation.json
185+ resources/animations/vpnactive_animation.json
186+ resources/animations/vpnlogo-drop_animation.json
187+ OUTPUTS
188+ animations/GlobeAnimation.qml
189+ animations/LockAnimation.qml
190+ animations/VpnActiveAnimation.qml
191+ animations/VpnLogoDropAnimation.qml
192+ )
0 commit comments