Remove WITH_QT6; switch to Qt6 by default

This commit is contained in:
Vadim Kuznetsov 2025-01-03 22:06:56 +03:00
parent 07970d566a
commit 6b39fda03c
16 changed files with 59 additions and 210 deletions

View File

@ -39,14 +39,8 @@ endif()
message(STATUS "${PROJECT_NAME} ${CMAKE_INSTALL_PREFIX} ${qucs-suite_BINARY_DIR}" )
if(WITH_QT6)
set(QT_VERSION_MAJOR 6)
else()
set(QT_VERSION_MAJOR 5)
endif()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Widgets LinguistTools)
set(QT_VERSION ${Qt${QT_VERSION_MAJOR}Core_VERSION})
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets LinguistTools)
set(QT_VERSION ${Qt6Core_VERSION})
message(STATUS "Qt Version: " ${QT_VERSION})

View File

@ -33,30 +33,15 @@ CONFIGURE_FILE (
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
if(WITH_QT6)
set(QT_VERSION_MAJOR 6)
else()
set(QT_VERSION_MAJOR 5)
endif()
if(QT_VERSION_MAJOR EQUAL 6)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Svg SvgWidgets)
find_package(Qt6 REQUIRED COMPONENTS Core Widgets Svg SvgWidgets)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Svg_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}SvgWidgets_INCLUDE_DIRS}
${Qt6Core_INCLUDE_DIRS}
${Qt6Widgets_INCLUDE_DIRS}
${Qt6Svg_INCLUDE_DIRS}
${Qt6SvgWidgets_INCLUDE_DIRS}
)
else()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Svg)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Svg_INCLUDE_DIRS}
)
endif()
set(QT_VERSION ${Qt${QT_VERSION_MAJOR}Core_VERSION})
set(QT_VERSION ${Qt6Core_VERSION})
if (${QT_VERSION} VERSION_LESS "6.7.0")
set(CMAKE_CXX_STANDARD 17)
@ -109,13 +94,8 @@ helpdialog.h
)
SET(RESOURCES qucsactivefilter.qrc)
IF(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP(QUCS-ACTIVE-FILTER_MOC_SRCS ${QUCS-ACTIVE-FILTER_MOC_HDRS})
QT6_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
ELSE()
QT5_WRAP_CPP(QUCS-ACTIVE-FILTER_MOC_SRCS ${QUCS-ACTIVE-FILTER_MOC_HDRS})
QT5_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
ENDIF()
@ -143,13 +123,7 @@ ADD_EXECUTABLE(${QUCS_NAME}activefilter MACOSX_BUNDLE WIN32
${RESOURCES_SRCS} )
if(QT_VERSION_MAJOR EQUAL 6)
TARGET_LINK_LIBRARIES(${QUCS_NAME}activefilter Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::SvgWidgets)
else()
TARGET_LINK_LIBRARIES(${QUCS_NAME}activefilter Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Svg )
endif()
TARGET_LINK_LIBRARIES(${QUCS_NAME}activefilter Qt6::Core Qt6::Widgets Qt6::Svg Qt6::SvgWidgets)
SET_TARGET_PROPERTIES(${QUCS_NAME}activefilter PROPERTIES POSITION_INDEPENDENT_CODE TRUE)

View File

@ -32,20 +32,14 @@ CONFIGURE_FILE (
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
if(WITH_QT6)
set(QT_VERSION_MAJOR 6)
else()
set(QT_VERSION_MAJOR 5)
endif()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Widgets)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Gui_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
${Qt6Core_INCLUDE_DIRS}
${Qt6Gui_INCLUDE_DIRS}
${Qt6Widgets_INCLUDE_DIRS}
)
set(QT_VERSION ${Qt${QT_VERSION_MAJOR}Core_VERSION})
set(QT_VERSION ${Qt6Core_VERSION})
if (${QT_VERSION} VERSION_LESS "6.7.0")
set(CMAKE_CXX_STANDARD 17)
@ -87,13 +81,8 @@ SET( attenuator_moc_headers qucsattenuator.h )
SET(RESOURCES qucsattenuator.qrc)
if(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP( attenuator_moc_sources ${attenuator_moc_headers} )
QT6_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
else()
QT5_WRAP_CPP( attenuator_moc_sources ${attenuator_moc_headers} )
QT5_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
endif()
IF(APPLE)
# set information on Info.plist file
@ -118,7 +107,7 @@ ADD_EXECUTABLE( ${QUCS_NAME}attenuator MACOSX_BUNDLE WIN32
${attenuator_moc_sources}
${RESOURCES_SRCS} )
TARGET_LINK_LIBRARIES( ${QUCS_NAME}attenuator Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets )
TARGET_LINK_LIBRARIES( ${QUCS_NAME}attenuator Qt6::Core Qt6::Gui Qt6::Widgets )
SET_TARGET_PROPERTIES(${QUCS_NAME}attenuator PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
#INSTALL (TARGETS ${QUCS_NAME}attenuator DESTINATION bin)
#

View File

@ -33,21 +33,15 @@ CONFIGURE_FILE (
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
if(WITH_QT6)
set(QT_VERSION_MAJOR 6)
else()
set(QT_VERSION_MAJOR 5)
endif()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Widgets)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Gui_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
${Qt6Core_INCLUDE_DIRS}
${Qt6Gui_INCLUDE_DIRS}
${Qt6Widgets_INCLUDE_DIRS}
)
set(QT_VERSION ${Qt${QT_VERSION_MAJOR}Core_VERSION})
set(QT_VERSION ${Qt6Core_VERSION})
if (${QT_VERSION} VERSION_LESS "6.7.0")
set(CMAKE_CXX_STANDARD 17)
@ -121,13 +115,8 @@ SET(QUCS-FILTER_MOC_HDRS
SET(RESOURCES qucsfilter.qrc)
if(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP(QUCS-FILTER_MOC_SRCS ${QUCS-FILTER_MOC_HDRS})
QT6_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
else()
QT5_WRAP_CPP(QUCS-FILTER_MOC_SRCS ${QUCS-FILTER_MOC_HDRS})
QT5_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
endif()
IF(APPLE)
# set information on Info.plist file
@ -153,7 +142,7 @@ ADD_EXECUTABLE(${QUCS_NAME}filter MACOSX_BUNDLE WIN32
${QUCS-FILTER_MOC_SRCS}
${RESOURCES_SRCS} )
TARGET_LINK_LIBRARIES(${QUCS_NAME}filter Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets)
TARGET_LINK_LIBRARIES(${QUCS_NAME}filter Qt6::Core Qt6::Gui Qt6::Widgets)
SET_TARGET_PROPERTIES(${QUCS_NAME}filter PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
INSTALL(TARGETS ${QUCS_NAME}filter

View File

@ -33,30 +33,15 @@ CONFIGURE_FILE (
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
if(WITH_QT6)
set(QT_VERSION_MAJOR 6)
else()
set(QT_VERSION_MAJOR 5)
endif()
if(QT_VERSION_MAJOR EQUAL 6)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Svg SvgWidgets)
find_package(Qt6 REQUIRED COMPONENTS Core Widgets Svg SvgWidgets)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Svg_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}SvgWidgets_INCLUDE_DIRS}
${Qt6Core_INCLUDE_DIRS}
${Qt6Widgets_INCLUDE_DIRS}
${Qt6Svg_INCLUDE_DIRS}
${Qt6SvgWidgets_INCLUDE_DIRS}
)
else()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Svg)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Svg_INCLUDE_DIRS}
)
endif()
set(QT_VERSION ${Qt${QT_VERSION_MAJOR}Core_VERSION})
set(QT_VERSION ${Qt6Core_VERSION})
if (${QT_VERSION} VERSION_LESS "6.7.0")
set(CMAKE_CXX_STANDARD 17)
@ -104,13 +89,9 @@ SET(QUCS-POWCOMB_MOC_HDRS
)
SET(RESOURCES qucspowercombining.qrc)
IF(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP(QUCS-POWCOMB_MOC_SRCS ${QUCS-POWCOMB_MOC_HDRS})
QT6_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
ELSE()
QT5_WRAP_CPP(QUCS-POWCOMB_MOC_SRCS ${QUCS-POWCOMB_MOC_HDRS})
QT5_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
ENDIF()
IF(APPLE)
# set information on Info.plist file
@ -136,13 +117,8 @@ ADD_EXECUTABLE(${QUCS_NAME}powercombining MACOSX_BUNDLE WIN32
${QUCS-POWCOMB_MOC_SRCS}
${RESOURCES_SRCS} )
if(QT_VERSION_MAJOR EQUAL 6)
TARGET_LINK_LIBRARIES(${QUCS_NAME}powercombining Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::SvgWidgets)
else()
TARGET_LINK_LIBRARIES(${QUCS_NAME}powercombining Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Svg )
endif()
TARGET_LINK_LIBRARIES(${QUCS_NAME}powercombining Qt6::Core
Qt6::Widgets Qt6::Svg Qt6::SvgWidgets)
SET_TARGET_PROPERTIES(${QUCS_NAME}powercombining PROPERTIES POSITION_INDEPENDENT_CODE TRUE)

View File

@ -32,16 +32,11 @@ CONFIGURE_FILE (
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
if(WITH_QT6)
set(QT_VERSION_MAJOR 6)
else()
set(QT_VERSION_MAJOR 5)
endif()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Widgets Charts)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Charts)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Gui_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
${Qt6Core_INCLUDE_DIRS}
${Qt6Gui_INCLUDE_DIRS}
${Qt6Widgets_INCLUDE_DIRS}
)
@ -85,13 +80,8 @@ SET( spar_viewer_moc_headers qucs-s-spar-viewer.h codeeditor.h)
SET(RESOURCES qucs-s-spar-viewer.qrc)
if(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP( spar_viewer_moc_sources ${spar_viewer_moc_headers} )
QT6_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
else()
QT5_WRAP_CPP( spar_viewer_moc_sources ${spar_viewer_moc_headers} )
QT5_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
endif()
IF(APPLE)
# set information on Info.plist file
@ -118,7 +108,7 @@ ADD_EXECUTABLE( ${QUCS_NAME}spar-viewer MACOSX_BUNDLE WIN32
codeeditor.cpp
codeeditor.h )
TARGET_LINK_LIBRARIES( ${QUCS_NAME}spar-viewer Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Charts )
TARGET_LINK_LIBRARIES( ${QUCS_NAME}spar-viewer Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Charts )
SET_TARGET_PROPERTIES(${QUCS_NAME}spar-viewer PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
#INSTALL (TARGETS ${QUCS_NAME}spar-viewer DESTINATION bin)
#

View File

@ -32,21 +32,15 @@ CONFIGURE_FILE (
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
if(WITH_QT6)
set(QT_VERSION_MAJOR 6)
else()
set(QT_VERSION_MAJOR 5)
endif()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Widgets )
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets )
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Gui_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
${Qt6Core_INCLUDE_DIRS}
${Qt6Gui_INCLUDE_DIRS}
${Qt6Widgets_INCLUDE_DIRS}
)
set(QT_VERSION ${Qt${QT_VERSION_MAJOR}Core_VERSION})
set(QT_VERSION ${Qt6Core_VERSION})
if (${QT_VERSION} VERSION_LESS "6.7.0")
set(CMAKE_CXX_STANDARD 17)
@ -116,13 +110,8 @@ SET( LIB_SRC
SET(RESOURCES qucstrans_.qrc)
IF(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP( QUCSTRANS_MOC_SRCS ${QUCSTRANS_MOC_HDRS} )
QT6_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
ELSE()
QT5_WRAP_CPP( QUCSTRANS_MOC_SRCS ${QUCSTRANS_MOC_HDRS} )
QT5_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
ENDIF()
ADD_LIBRARY(transcalc STATIC ${LIB_SRC} )
@ -151,7 +140,7 @@ ADD_EXECUTABLE(${QUCS_NAME}trans MACOSX_BUNDLE WIN32
${QUCSTRANS_MOC_SRCS}
${RESOURCES_SRCS} )
TARGET_LINK_LIBRARIES( ${QUCS_NAME}trans Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets transcalc )
TARGET_LINK_LIBRARIES( ${QUCS_NAME}trans Qt6::Core Qt6::Gui Qt6::Widgets transcalc )
SET_TARGET_PROPERTIES(${QUCS_NAME}trans PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
#INSTALL(TARGETS ${QUCS_NAME}trans DESTINATION bin)

View File

@ -59,19 +59,13 @@ endif()
add_compile_definitions(HAVE_CONFIG_H)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if(WITH_QT6)
set(QT_VERSION_MAJOR 6)
else()
set(QT_VERSION_MAJOR 5)
endif()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Widgets Svg Xml PrintSupport)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Svg Xml PrintSupport)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Svg_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}Xml_INCLUDE_DIRS}
${Qt${QT_VERSION_MAJOR}PrintSupport_INCLUDE_DIRS}
${Qt6Core_INCLUDE_DIRS}
${Qt6Widgets_INCLUDE_DIRS}
${Qt6Svg_INCLUDE_DIRS}
${Qt6Xml_INCLUDE_DIRS}
${Qt6PrintSupport_INCLUDE_DIRS}
)
@ -85,13 +79,11 @@ CONFIGURE_FILE (
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
IF(QT_VERSION_MAJOR EQUAL 6)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
ENDIF()
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(QT_VERSION ${Qt${QT_VERSION_MAJOR}Core_VERSION})
set(QT_VERSION ${Qt6Core_VERSION})
if (${QT_VERSION} VERSION_LESS "6.7.0")
set(CMAKE_CXX_STANDARD 17)
@ -196,13 +188,8 @@ SET(QUCS_MOC_HDRS
# headers that need to be moc'ed
# generate rules for building source files from bitmap resources
SET(RESOURCES qucs.qrc)
IF(QT_VERSION_MAJOR EQUAL 6)
Qt6_WRAP_CPP( QUCS_MOC_SRCS ${QUCS_MOC_HDRS} )
Qt6_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
ELSE()
Qt5_WRAP_CPP( QUCS_MOC_SRCS ${QUCS_MOC_HDRS} )
Qt5_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
ENDIF()
if(UNIX AND NOT APPLE)
@ -275,8 +262,7 @@ ADD_EXECUTABLE( ${QUCS_NAME} MACOSX_BUNDLE WIN32
#
TARGET_LINK_LIBRARIES( ${QUCS_NAME}
components diagrams dialogs paintings extsimkernels spicecomponents qt3_compat
Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::Xml Qt${QT_VERSION_MAJOR}::PrintSupport )
Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Svg Qt6::Xml Qt6::PrintSupport )
SET_TARGET_PROPERTIES(${QUCS_NAME} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
#
# Prepare the installation

View File

@ -245,11 +245,7 @@ spicefile.h
)
IF(QT_VERSION_MAJOR EQUAL 6)
qt6_wrap_cpp(COMPONENTS_MOC_SRCS ${COMPONENTS_MOC_HDRS})
else()
qt5_wrap_cpp(COMPONENTS_MOC_SRCS ${COMPONENTS_MOC_HDRS})
endif()
qt6_wrap_cpp(COMPONENTS_MOC_SRCS ${COMPONENTS_MOC_HDRS})

View File

@ -34,10 +34,6 @@ diagramdialog.h
markerdialog.h
)
IF(QT_VERSION_MAJOR EQUAL 6)
qt6_wrap_cpp( DIAGRAMS_MOC_SRCS ${DIAGRAMS_MOC_HDRS} )
else()
qt5_wrap_cpp( DIAGRAMS_MOC_SRCS ${DIAGRAMS_MOC_HDRS} )
endif()
qt6_wrap_cpp( DIAGRAMS_MOC_SRCS ${DIAGRAMS_MOC_HDRS} )
ADD_LIBRARY(diagrams STATIC ${DIAGRAMS_HDRS} ${DIAGRAMS_SRCS} ${DIAGRAMS_MOC_SRCS})

View File

@ -74,13 +74,7 @@ searchdialog.ui
)
IF(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP( DIALOGS_MOC_SRCS ${DIALOGS_MOC_HDRS} )
QT6_WRAP_UI( DIALOGS_UIC_SRCS ${DIALOGS_UIC_HDRS} )
else()
QT5_WRAP_CPP( DIALOGS_MOC_SRCS ${DIALOGS_MOC_HDRS} )
QT5_WRAP_UI( DIALOGS_UIC_SRCS ${DIALOGS_UIC_HDRS} )
endif()
QT6_WRAP_CPP( DIALOGS_MOC_SRCS ${DIALOGS_MOC_HDRS} )
QT6_WRAP_UI( DIALOGS_UIC_SRCS ${DIALOGS_UIC_HDRS} )
ADD_LIBRARY(dialogs STATIC ${DIALOGS_HDRS} ${DIALOGS_SRCS} ${DIALOGS_MOC_SRCS} ${DIALOGS_UIC_SRCS})

View File

@ -48,12 +48,7 @@ simsettingsdialog.h
spicelibcompdialog.h
)
IF(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP( EXTSIMKERNELS_MOC_SRCS ${EXTSIMKERNELS_MOC_HDRS} )
else()
QT5_WRAP_CPP( EXTSIMKERNELS_MOC_SRCS ${EXTSIMKERNELS_MOC_HDRS} )
endif()
QT6_WRAP_CPP( EXTSIMKERNELS_MOC_SRCS ${EXTSIMKERNELS_MOC_HDRS} )
ADD_LIBRARY(extsimkernels STATIC ${EXTSIMKERNELS_HDRS} ${EXTSIMKERNELS_SRCS} ${EXTSIMKERNELS_MOC_SRCS})

View File

@ -39,11 +39,7 @@ id_dialog.h
)
IF(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP( PAINTINGS_MOC_SRCS ${PAINTINGS_MOC_HDRS} )
else()
QT5_WRAP_CPP( PAINTINGS_MOC_SRCS ${PAINTINGS_MOC_HDRS} )
endif()
QT6_WRAP_CPP( PAINTINGS_MOC_SRCS ${PAINTINGS_MOC_HDRS} )
ADD_LIBRARY(paintings STATIC ${PAINTINGS_HDRS} ${PAINTINGS_SRCS} ${PAINTINGS_MOC_SRCS} )

View File

@ -31,10 +31,6 @@ q3frame.h
)
IF(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP( QT3_COMPAT_SRCS ${QT3_COMPAT_MOC_HDRS} )
else()
QT5_WRAP_CPP( QT3_COMPAT_SRCS ${QT3_COMPAT_MOC_HDRS} )
endif()
QT6_WRAP_CPP( QT3_COMPAT_SRCS ${QT3_COMPAT_MOC_HDRS} )
ADD_LIBRARY(qt3_compat STATIC ${QT3_COMPAT_HDRS} ${QT3_COMPAT_SRCS})

View File

@ -191,9 +191,6 @@ spicelibcomp.h
)
#QT4_WRAP_CPP(COMPONENTS_MOC_SRCS ${COMPONENTS_MOC_HDRS})
ADD_LIBRARY(spicecomponents STATIC ${COMPONENTS_HDRS} ${COMPONENTS_SRCS} ${COMPONENTS_MOC_SRCS} )

View File

@ -13,19 +13,11 @@ 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")
IF(WITH_QT6)
IF (UPDATE_TRANSLATIONS)
QT6_CREATE_TRANSLATION ( QM_FILES ${FILES_TO_TRANSLATE} ${TRANSLATIONS_FILES})
ELSE (UPDATE_TRANSLATIONS)
QT6_ADD_TRANSLATION ( QM_FILES ${TRANSLATIONS_FILES})
ENDIF (UPDATE_TRANSLATIONS)
ELSE()
IF (UPDATE_TRANSLATIONS)
QT5_CREATE_TRANSLATION ( QM_FILES ${FILES_TO_TRANSLATE} ${TRANSLATIONS_FILES})
ELSE (UPDATE_TRANSLATIONS)
QT5_ADD_TRANSLATION ( QM_FILES ${TRANSLATIONS_FILES})
ENDIF (UPDATE_TRANSLATIONS)
ENDIF()
ADD_CUSTOM_TARGET (translations ALL DEPENDS ${QM_FILES})