Skip to content

Commit 925a660

Browse files
committed
Fix build with Qt6.10
https://bugs.gentoo.org/966288
1 parent 3027630 commit 925a660

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,14 @@ ELSE()
609609
ENDIF()
610610
FIND_PACKAGE(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS
611611
Concurrent Gui Network Widgets Charts Positioning)
612+
SET(USE_BUNDLED_QTCOMPRESS 1 CACHE BOOL "Use bundled version of qtcompress")
613+
# Qt 6.10 split off FooPrivate from Foo.
614+
# https://code.qt.io/cgit/qt/qtreleasenotes.git/about/qt/6.10.0/release-note.md
615+
# > ad7b94e163a: User projects must now call find_package(Qt6 COMPONENTS FooPrivate) to make use of the Qt6::FooPrivate target.
616+
# For the case of Qt5 this condition evaluates to false.
617+
IF(Qt6_VERSION VERSION_GREATER_EQUAL 6.10 AND NOT USE_BUNDLED_QTCOMPRESS)
618+
FIND_PACKAGE(Qt6 REQUIRED COMPONENTS GuiPrivate)
619+
ENDIF()
612620
IF(USE_PLUGIN_TELESCOPECONTROL OR ENABLE_GPS)
613621
FIND_PACKAGE(Qt${QT_VERSION_MAJOR} COMPONENTS SerialPort REQUIRED)
614622
ENDIF()
@@ -809,7 +817,6 @@ ELSE()
809817
MESSAGE(STATUS "Using system-provided zlib at ${ZLIB_LIBRARIES}")
810818
ENDIF()
811819

812-
SET(USE_BUNDLED_QTCOMPRESS 1 CACHE BOOL "Use bundled version of qtcompress")
813820
IF(USE_BUNDLED_QTCOMPRESS)
814821
ADD_DEFINITIONS(-DUSE_BUNDLED_QTCOMPRESS)
815822
MESSAGE(STATUS "Using bundled qtcompress at ${CMAKE_SOURCE_DIR}/src/external/qtcompress")

0 commit comments

Comments
 (0)