Fix build when both Qt version are installed

This commit is contained in:
Vadim Kuznetsov 2024-03-06 10:48:56 +03:00
parent f9ec56adf9
commit 4e83433c49
7 changed files with 1 additions and 8 deletions

View File

@ -242,7 +242,6 @@ optimizedialog.h
spicefile.h spicefile.h
) )
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
IF(QT_VERSION_MAJOR EQUAL 6) IF(QT_VERSION_MAJOR EQUAL 6)
qt6_wrap_cpp(COMPONENTS_MOC_SRCS ${COMPONENTS_MOC_HDRS}) qt6_wrap_cpp(COMPONENTS_MOC_SRCS ${COMPONENTS_MOC_HDRS})

View File

@ -33,7 +33,6 @@ SET(DIAGRAMS_MOC_HDRS
diagramdialog.h diagramdialog.h
markerdialog.h markerdialog.h
) )
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
IF(QT_VERSION_MAJOR EQUAL 6) IF(QT_VERSION_MAJOR EQUAL 6)
qt6_wrap_cpp( DIAGRAMS_MOC_SRCS ${DIAGRAMS_MOC_HDRS} ) qt6_wrap_cpp( DIAGRAMS_MOC_SRCS ${DIAGRAMS_MOC_HDRS} )

View File

@ -72,7 +72,6 @@ SET(DIALOGS_UIC_HDRS
searchdialog.ui searchdialog.ui
) )
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
IF(QT_VERSION_MAJOR EQUAL 6) IF(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP( DIALOGS_MOC_SRCS ${DIALOGS_MOC_HDRS} ) QT6_WRAP_CPP( DIALOGS_MOC_SRCS ${DIALOGS_MOC_HDRS} )

View File

@ -45,7 +45,6 @@ customsimdialog.h
simsettingsdialog.h simsettingsdialog.h
) )
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
IF(QT_VERSION_MAJOR EQUAL 6) IF(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP( EXTSIMKERNELS_MOC_SRCS ${EXTSIMKERNELS_MOC_HDRS} ) QT6_WRAP_CPP( EXTSIMKERNELS_MOC_SRCS ${EXTSIMKERNELS_MOC_HDRS} )

View File

@ -38,7 +38,6 @@ graphictextdialog.h
id_dialog.h id_dialog.h
) )
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
IF(QT_VERSION_MAJOR EQUAL 6) IF(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP( PAINTINGS_MOC_SRCS ${PAINTINGS_MOC_HDRS} ) QT6_WRAP_CPP( PAINTINGS_MOC_SRCS ${PAINTINGS_MOC_HDRS} )

View File

@ -30,7 +30,6 @@ q3scrollview.h
q3frame.h q3frame.h
) )
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
IF(QT_VERSION_MAJOR EQUAL 6) IF(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP( QT3_COMPAT_SRCS ${QT3_COMPAT_MOC_HDRS} ) QT6_WRAP_CPP( QT3_COMPAT_SRCS ${QT3_COMPAT_MOC_HDRS} )

View File

@ -12,9 +12,8 @@ file (GLOB TRANSLATIONS_FILES qucs_*.ts)
# WARNING: make clean might delete the source .ts files! Danger! # WARNING: make clean might delete the source .ts files! Danger!
option (UPDATE_TRANSLATIONS "Update source translation translations/*.ts" "OFF") 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) IF (UPDATE_TRANSLATIONS)
QT6_CREATE_TRANSLATION ( QM_FILES ${FILES_TO_TRANSLATE} ${TRANSLATIONS_FILES}) QT6_CREATE_TRANSLATION ( QM_FILES ${FILES_TO_TRANSLATE} ${TRANSLATIONS_FILES})
ELSE (UPDATE_TRANSLATIONS) ELSE (UPDATE_TRANSLATIONS)