From 89e8445630ead58272f768b460ee4e1aa3798f7e Mon Sep 17 00:00:00 2001 From: Oleg Shparber Date: Sat, 8 Apr 2023 13:50:02 -0400 Subject: [PATCH] build(cmake): require Qt 6.5 to install runtime dependencies (#1483) --- .github/workflows/build-check.yml | 4 ++-- src/app/CMakeLists.txt | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 300a6b1..9603fce 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -98,7 +98,7 @@ jobs: name: "Windows Server 2022 / Qt 6", os: windows-2022, qt_modules: "qtwebengine qtwebchannel qtpositioning", - qt_version: "6.4.0", + qt_version: "6.5.0", configurePreset: ninja-multi-vcpkg, buildPreset: ninja-multi-vcpkg-release } @@ -106,7 +106,7 @@ jobs: name: "Windows Server 2022 / Qt 6 / Portable", os: windows-2022, qt_modules: "qtwebengine qtwebchannel qtpositioning", - qt_version: "6.4.0", + qt_version: "6.5.0", configurePreset: ninja-multi-vcpkg-portable, buildPreset: ninja-multi-vcpkg-portable-release } diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 9be053f..915bf17 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -3,9 +3,9 @@ if (Qt${QT_VERSION_MAJOR}Widgets_VERSION VERSION_LESS QT_MINIMUM_VERSION) message(FATAL_ERROR "Qt version >= ${QT_MINIMUM_VERSION} is required.") endif() -# qt_standard_project_setup and qt_deploy_runtime_dependencies require Qt version >=6.3.0. -if(Qt${QT_VERSION_MAJOR}Widgets_VERSION VERSION_GREATER_EQUAL "6.3.0") - set(use_qt63_cmake_commands TRUE) +# Only support installing runtime dependencies with Qt >=6.5.0. +if(Qt${QT_VERSION_MAJOR}Widgets_VERSION VERSION_GREATER_EQUAL "6.5.0") + set(use_qt_cmake_commands TRUE) qt_standard_project_setup() endif() @@ -41,7 +41,7 @@ set_target_properties(App PROPERTIES ) # Install Qt runtime dependencies on Windows. -if(WIN32 AND use_qt63_cmake_commands) +if(WIN32 AND use_qt_cmake_commands) # The following script will be executed at install time. set(qt_deploy_script "${CMAKE_CURRENT_BINARY_DIR}/qt-deploy-$.cmake") @@ -53,6 +53,7 @@ include(\"${QT_DEPLOY_SUPPORT}\") qt_deploy_runtime_dependencies( EXECUTABLE \"$\" BIN_DIR . + NO_TRANSLATIONS VERBOSE )") endif() @@ -69,12 +70,12 @@ if(APPLE) MACOSX_BUNDLE_COPYRIGHT ${PROJECT_COPYRIGHT} RESOURCE "resources/zeal.icns" ) -elseif(WIN32 AND use_qt63_cmake_commands) +elseif(WIN32 AND use_qt_cmake_commands) # Install Qt runtime dependencies. install(SCRIPT ${qt_deploy_script}) unset(qt_deploy_script) - unset(use_qt63_cmake_commands) + unset(use_qt_cmake_commands) elseif(UNIX) include(GNUInstallDirs) install(TARGETS App DESTINATION ${CMAKE_INSTALL_BINDIR})