From 222365b5e3fac418ac8694e304ab0deb42735c3b Mon Sep 17 00:00:00 2001 From: jvoisin Date: Tue, 25 Apr 2023 22:00:20 +0200 Subject: [PATCH] Fix a qt deprecation warning in cmake --- apps/opencs/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/opencs/CMakeLists.txt b/apps/opencs/CMakeLists.txt index 0d0741c15a..00a0c4ead7 100644 --- a/apps/opencs/CMakeLists.txt +++ b/apps/opencs/CMakeLists.txt @@ -149,7 +149,11 @@ if(WIN32) set(QT_USE_QTMAIN TRUE) endif(WIN32) -qt_wrap_ui(OPENCS_UI_HDR ${OPENCS_UI}) +if (QT_VERSION_MAJOR VERSION_EQUAL 5) + qt5_wrap_ui(OPENCS_UI_HDR ${OPENCS_UI}) +else () + qt6_wrap_ui(OPENCS_UI_HDR ${OPENCS_UI}) +endif() qt_add_resources(OPENCS_RES_SRC ${OPENCS_RES}) # for compiled .ui files