Skip to content

Commit

Permalink
Merge pull request #629 from ra3xdh/revert_with_qt6
Browse files Browse the repository at this point in the history
Revert WITH_QT6
  • Loading branch information
ra3xdh authored Mar 6, 2024
2 parents cc991c6 + 4e83433 commit d7b3118
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake_qt6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: cmake -B ${{github.workspace}}/build -DWITH_QT6=ON -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
Expand Down
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ endif()

message(STATUS "${PROJECT_NAME} ${CMAKE_INSTALL_PREFIX} ${qucs-suite_BINARY_DIR}" )

set(QT_DEFAULT_MAJOR_VERSION 6)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Gui Widgets LinguistTools)
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)
message(STATUS "QT Major Version: " ${QT_VERSION_MAJOR})

Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ installation steps. Default installation directory will be `/usr/local` if

#### Qt6

Since v1.0.1 Qucs-S supports build with Qt6. Set the `QT_DIR` environment variable
to tell CMake use the Qt6. For example use the following command sequence for Ubuntu-22.04
Since v1.0.1 Qucs-S supports build with Qt6. Set the `WITH_QT6` flag to tell CMake use the Qt6.
For example use the following command sequence for Ubuntu-22.04

~~~
export QT_DIR=/usr/lib/x86_64-linux-gnu/cmake/Qt6
cmake .. -DCMAKE_INSTALL_PREFIX=/your_install_prefix/
cmake .. -DWITH_QT6=ON -DCMAKE_INSTALL_PREFIX=/your_install_prefix/
~~~

### Running
Expand Down
7 changes: 6 additions & 1 deletion qucs-activefilter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ CONFIGURE_FILE (

INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
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)
Expand Down
6 changes: 5 additions & 1 deletion qucs-attenuator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ CONFIGURE_FILE (

INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Gui Widgets)
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)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
Expand Down
7 changes: 6 additions & 1 deletion qucs-filter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ CONFIGURE_FILE (

INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Gui Widgets)
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)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
Expand Down
7 changes: 6 additions & 1 deletion qucs-powercombining/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ CONFIGURE_FILE (

INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
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)
include_directories(
Expand Down
7 changes: 6 additions & 1 deletion qucs-transcalc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ CONFIGURE_FILE (

INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Gui Widgets )
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 )
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
Expand Down
7 changes: 6 additions & 1 deletion qucs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ endif()
add_compile_definitions(HAVE_CONFIG_H)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Gui Widgets Svg Xml PrintSupport)
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)
include_directories(
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
Expand Down
1 change: 0 additions & 1 deletion qucs/components/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
1 change: 0 additions & 1 deletion qucs/diagrams/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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} )
Expand Down
1 change: 0 additions & 1 deletion qucs/dialogs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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} )
Expand Down
1 change: 0 additions & 1 deletion qucs/extsimkernels/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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} )
Expand Down
1 change: 0 additions & 1 deletion qucs/paintings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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} )
Expand Down
1 change: 0 additions & 1 deletion qucs/qt3_compat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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} )
Expand Down
3 changes: 1 addition & 2 deletions translations/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d7b3118

Please sign in to comment.