CMake: Only build the repo when dependencies are available


Make sure to build the Lotty module only when the
QuickVectorImagePrivate dependency is available.

Avoids an error like the following in the Debian CI packaging:

CMake Error at
 /opt/qt-6.13.0/aarch64-linux-gnu/lib/cmake/Qt6
 /QtFindPackageHelpers.cmake:715 (get_target_property):
  get_target_property() called with non-existent target
  "Qt6::QuickVectorImagePrivate".
Call Stack (most recent call first):
  Qt6/QtTargetHelpers.cmake:300
   (qt_internal_register_target_dependencies)
  Qt6/QtModuleHelpers.cmake:716 (qt_internal_extend_target)
  Qt6Qml/Qt6QmlBuildInternals.cmake:165 (qt_internal_add_module)
  src/CMakeLists.txt:3 (qt_internal_add_qml_module)

Pick-to: 6.12
Change-Id: I42d44fe0a9209b3072fd319e806c4fa7787f4f3c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Simo Fält <simo.falt@qt.io>
commitcf86295d9993dd4ff97dcd1552c416aee4494b75
parentd1b7ce4ad639793ebffa58b0ee52cbfe0776e364
authorAlexandru Croitor <alexandru.croitor@qt.io>
committerAlexandru Croitor <alexandru.croitor@qt.io>
commit timeThu, 13 Aug 2026 11:42:17 +0000