From 6b39fda03c1b04d107a17fd6c333bd88fd9459fd Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Fri, 3 Jan 2025 22:06:56 +0300 Subject: [PATCH] Remove WITH_QT6; switch to Qt6 by default --- CMakeLists.txt | 10 ++----- qucs-activefilter/CMakeLists.txt | 40 +++++---------------------- qucs-attenuator/CMakeLists.txt | 23 +++++----------- qucs-filter/CMakeLists.txt | 23 +++++----------- qucs-powercombining/CMakeLists.txt | 42 +++++++---------------------- qucs-s-spar-viewer/CMakeLists.txt | 20 ++++---------- qucs-transcalc/CMakeLists.txt | 23 +++++----------- qucs/CMakeLists.txt | 36 ++++++++----------------- qucs/components/CMakeLists.txt | 6 +---- qucs/diagrams/CMakeLists.txt | 6 +---- qucs/dialogs/CMakeLists.txt | 10 ++----- qucs/extsimkernels/CMakeLists.txt | 7 +---- qucs/paintings/CMakeLists.txt | 6 +---- qucs/qt3_compat/CMakeLists.txt | 6 +---- qucs/spicecomponents/CMakeLists.txt | 3 --- translations/CMakeLists.txt | 8 ------ 16 files changed, 59 insertions(+), 210 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e75f85f..608e7c12 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) diff --git a/qucs-activefilter/CMakeLists.txt b/qucs-activefilter/CMakeLists.txt index 3629d0f9..0edf6a36 100644 --- a/qucs-activefilter/CMakeLists.txt +++ b/qucs-activefilter/CMakeLists.txt @@ -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) diff --git a/qucs-attenuator/CMakeLists.txt b/qucs-attenuator/CMakeLists.txt index f9086f14..cdc9c70b 100644 --- a/qucs-attenuator/CMakeLists.txt +++ b/qucs-attenuator/CMakeLists.txt @@ -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) # diff --git a/qucs-filter/CMakeLists.txt b/qucs-filter/CMakeLists.txt index 72c5c9b2..820aec44 100644 --- a/qucs-filter/CMakeLists.txt +++ b/qucs-filter/CMakeLists.txt @@ -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 diff --git a/qucs-powercombining/CMakeLists.txt b/qucs-powercombining/CMakeLists.txt index e8933b2d..f7e0311e 100644 --- a/qucs-powercombining/CMakeLists.txt +++ b/qucs-powercombining/CMakeLists.txt @@ -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) diff --git a/qucs-s-spar-viewer/CMakeLists.txt b/qucs-s-spar-viewer/CMakeLists.txt index 23c2bb72..08046660 100644 --- a/qucs-s-spar-viewer/CMakeLists.txt +++ b/qucs-s-spar-viewer/CMakeLists.txt @@ -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) # diff --git a/qucs-transcalc/CMakeLists.txt b/qucs-transcalc/CMakeLists.txt index ffbc092e..77a13cd4 100644 --- a/qucs-transcalc/CMakeLists.txt +++ b/qucs-transcalc/CMakeLists.txt @@ -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) diff --git a/qucs/CMakeLists.txt b/qucs/CMakeLists.txt index 8d8c571e..3a5ac163 100755 --- a/qucs/CMakeLists.txt +++ b/qucs/CMakeLists.txt @@ -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 diff --git a/qucs/components/CMakeLists.txt b/qucs/components/CMakeLists.txt index ac943265..771385ea 100644 --- a/qucs/components/CMakeLists.txt +++ b/qucs/components/CMakeLists.txt @@ -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}) diff --git a/qucs/diagrams/CMakeLists.txt b/qucs/diagrams/CMakeLists.txt index e9b549eb..e9ca34b9 100755 --- a/qucs/diagrams/CMakeLists.txt +++ b/qucs/diagrams/CMakeLists.txt @@ -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}) diff --git a/qucs/dialogs/CMakeLists.txt b/qucs/dialogs/CMakeLists.txt index 0f2105ef..af9c8159 100755 --- a/qucs/dialogs/CMakeLists.txt +++ b/qucs/dialogs/CMakeLists.txt @@ -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}) diff --git a/qucs/extsimkernels/CMakeLists.txt b/qucs/extsimkernels/CMakeLists.txt index 4990eae1..a74fbc10 100755 --- a/qucs/extsimkernels/CMakeLists.txt +++ b/qucs/extsimkernels/CMakeLists.txt @@ -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}) diff --git a/qucs/paintings/CMakeLists.txt b/qucs/paintings/CMakeLists.txt index da67db9c..feebe522 100755 --- a/qucs/paintings/CMakeLists.txt +++ b/qucs/paintings/CMakeLists.txt @@ -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} ) diff --git a/qucs/qt3_compat/CMakeLists.txt b/qucs/qt3_compat/CMakeLists.txt index a78d568b..085a2a97 100755 --- a/qucs/qt3_compat/CMakeLists.txt +++ b/qucs/qt3_compat/CMakeLists.txt @@ -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}) diff --git a/qucs/spicecomponents/CMakeLists.txt b/qucs/spicecomponents/CMakeLists.txt index c0372bda..70744483 100644 --- a/qucs/spicecomponents/CMakeLists.txt +++ b/qucs/spicecomponents/CMakeLists.txt @@ -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} ) diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt index 5ae0bfb6..47a8a0bd 100644 --- a/translations/CMakeLists.txt +++ b/translations/CMakeLists.txt @@ -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})