From b127807f760847b02031068e8bb076e6a187c95f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Martins?= Date: Sun, 21 Sep 2025 23:47:20 +0100 Subject: [PATCH] cmake: fix build with Qt 6.10 --- .github/workflows/build.yml | 2 +- CHANGES | 1 + CMakeLists.txt | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 51ff1327..b880893d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: qt_modules: qtscxml qtremoteobjects qt_arch: win64_msvc2019_64 macos_architectures: "x86_64;arm64" - - qt_version: 6.9.0 # Bump to latest freely + - qt_version: 6.10.0 # Bump to latest freely qt_modules: qtscxml qtremoteobjects qt_arch: win64_msvc2022_64 macos_architectures: "x86_64;arm64" diff --git a/CHANGES b/CHANGES index f151f7ed..6c74f0de 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,7 @@ Version 2.2.0: -------------- * Bump to Graphviz 13.1.0 * Remove Qt 5 support to simplify maintenance + * Fix build with Qt 6.10 Version 2.1.0: -------------- diff --git a/CMakeLists.txt b/CMakeLists.txt index 59efa3a4..e83c0fc0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,6 +142,12 @@ set_package_properties( PURPOSE "Needed for the Qt SCXML adapter (adapter itself depends on Qt RemoteObjects)" ) +if(Qt6Gui_VERSION VERSION_GREATER_EQUAL "6.10.0") + set(QT_NO_PRIVATE_MODULE_WARNING ON) + find_package(Qt6GuiPrivate REQUIRED NO_MODULE) + find_package(Qt6ScxmlPrivate REQUIRED NO_MODULE) +endif() + include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) include(CheckIncludeFiles)