diff options
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c30196..d18be90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,4 +12,13 @@ project(QtSvg find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core) # special case find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Gui Widgets Xml) # special case + +# Needed for examples to configure properly when not using ExternalProject and when +# Qt is configured with a bundled zlib. +# Otherwise Qt6SvgDependencies will claim Qt6ZlibPrivate_FOUND is FALSE because we +# set QT_NO_CREATE_TARGETS to TRUE when building examples in-tree. +if(NOT QT_FEATURE_system_zlib) + find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS ZlibPrivate) +endif() + qt_build_repo() |