CMake: Remove the bundled-zlib in-tree examples workaround
The pre-loading of Qt6ZlibPrivate in qtsvg's top-level CMakeLists.txt
was a 2022 workaround for the case where examples are built in-tree
against a Qt configured with -qt-zlib. At the time, the examples
machinery set QT_NO_CREATE_TARGETS=TRUE globally, which caused
Qt6SvgDependencies.cmake's find_dependency(Qt6ZlibPrivate) to fail
with Qt6ZlibPrivate_FOUND=FALSE because Qt6ZlibPrivateConfig.cmake
short-circuited and never observed the build-time Qt6::ZlibPrivate
target.
Since the per-package TargetsPrecheck mechanism landed in qtbase, the
ZlibPrivate config self-detects the existing build-time target via
_qt_internal_check_multiple_inclusion and Qt6ZlibPrivate_FOUND is set
from the TARGET existence check rather than from including
Qt6ZlibPrivateTargets.cmake. The workaround is no longer required.
Verified with a top-level qtbase+qtsvg developer build configured with
-no-feature-system-zlib and QT_BUILD_EXAMPLES_AS_EXTERNAL=OFF: the
svgviewer example's find_package(Qt6 REQUIRED COMPONENTS Svg) resolves
cleanly without the pre-load.
Task-number: QTBUG-135233
Change-Id: Ic61262419cb48da803e643235a613441197bf518
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>