From 4e83433c490f0a98b9de918edfa788e21494a07e Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Wed, 6 Mar 2024 10:48:56 +0300 Subject: [PATCH] Fix build when both Qt version are installed --- qucs/components/CMakeLists.txt | 1 - qucs/diagrams/CMakeLists.txt | 1 - qucs/dialogs/CMakeLists.txt | 1 - qucs/extsimkernels/CMakeLists.txt | 1 - qucs/paintings/CMakeLists.txt | 1 - qucs/qt3_compat/CMakeLists.txt | 1 - translations/CMakeLists.txt | 3 +-- 7 files changed, 1 insertion(+), 8 deletions(-) diff --git a/qucs/components/CMakeLists.txt b/qucs/components/CMakeLists.txt index 2c0967ae..c87dbb52 100644 --- a/qucs/components/CMakeLists.txt +++ b/qucs/components/CMakeLists.txt @@ -242,7 +242,6 @@ optimizedialog.h spicefile.h ) -find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) IF(QT_VERSION_MAJOR EQUAL 6) qt6_wrap_cpp(COMPONENTS_MOC_SRCS ${COMPONENTS_MOC_HDRS}) diff --git a/qucs/diagrams/CMakeLists.txt b/qucs/diagrams/CMakeLists.txt index 07765fbd..e9b549eb 100755 --- a/qucs/diagrams/CMakeLists.txt +++ b/qucs/diagrams/CMakeLists.txt @@ -33,7 +33,6 @@ SET(DIAGRAMS_MOC_HDRS diagramdialog.h markerdialog.h ) -find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) IF(QT_VERSION_MAJOR EQUAL 6) qt6_wrap_cpp( DIAGRAMS_MOC_SRCS ${DIAGRAMS_MOC_HDRS} ) diff --git a/qucs/dialogs/CMakeLists.txt b/qucs/dialogs/CMakeLists.txt index f12d2050..b4ef1ca2 100755 --- a/qucs/dialogs/CMakeLists.txt +++ b/qucs/dialogs/CMakeLists.txt @@ -72,7 +72,6 @@ SET(DIALOGS_UIC_HDRS searchdialog.ui ) -find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) IF(QT_VERSION_MAJOR EQUAL 6) QT6_WRAP_CPP( DIALOGS_MOC_SRCS ${DIALOGS_MOC_HDRS} ) diff --git a/qucs/extsimkernels/CMakeLists.txt b/qucs/extsimkernels/CMakeLists.txt index 6d7afd6b..dd745e9c 100755 --- a/qucs/extsimkernels/CMakeLists.txt +++ b/qucs/extsimkernels/CMakeLists.txt @@ -45,7 +45,6 @@ customsimdialog.h simsettingsdialog.h ) -find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) IF(QT_VERSION_MAJOR EQUAL 6) QT6_WRAP_CPP( EXTSIMKERNELS_MOC_SRCS ${EXTSIMKERNELS_MOC_HDRS} ) diff --git a/qucs/paintings/CMakeLists.txt b/qucs/paintings/CMakeLists.txt index b88a8787..da67db9c 100755 --- a/qucs/paintings/CMakeLists.txt +++ b/qucs/paintings/CMakeLists.txt @@ -38,7 +38,6 @@ graphictextdialog.h id_dialog.h ) -find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) IF(QT_VERSION_MAJOR EQUAL 6) QT6_WRAP_CPP( PAINTINGS_MOC_SRCS ${PAINTINGS_MOC_HDRS} ) diff --git a/qucs/qt3_compat/CMakeLists.txt b/qucs/qt3_compat/CMakeLists.txt index efe0dc7a..a78d568b 100755 --- a/qucs/qt3_compat/CMakeLists.txt +++ b/qucs/qt3_compat/CMakeLists.txt @@ -30,7 +30,6 @@ q3scrollview.h q3frame.h ) -find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) IF(QT_VERSION_MAJOR EQUAL 6) QT6_WRAP_CPP( QT3_COMPAT_SRCS ${QT3_COMPAT_MOC_HDRS} ) diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt index 1a985e16..5ae0bfb6 100644 --- a/translations/CMakeLists.txt +++ b/translations/CMakeLists.txt @@ -12,9 +12,8 @@ file (GLOB TRANSLATIONS_FILES qucs_*.ts) # WARNING: make clean might delete the source .ts files! Danger! option (UPDATE_TRANSLATIONS "Update source translation translations/*.ts" "OFF") -find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) -IF(QT_VERSION_MAJOR EQUAL 6) +IF(WITH_QT6) IF (UPDATE_TRANSLATIONS) QT6_CREATE_TRANSLATION ( QM_FILES ${FILES_TO_TRANSLATE} ${TRANSLATIONS_FILES}) ELSE (UPDATE_TRANSLATIONS)