From cdfacb4b0bf5d905550d84c9d7cfed57a26a3ac1 Mon Sep 17 00:00:00 2001 From: Adrian Schneider Date: Fri, 11 Oct 2024 16:01:01 +0200 Subject: [PATCH 1/3] do not install vtk-qt-dev --- .github/workflows/cppVTK9DicomGUI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cppVTK9DicomGUI.yml b/.github/workflows/cppVTK9DicomGUI.yml index 652fd53..268c950 100644 --- a/.github/workflows/cppVTK9DicomGUI.yml +++ b/.github/workflows/cppVTK9DicomGUI.yml @@ -8,7 +8,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Install packages - run: sudo apt-get update && sudo apt-get install -y build-essential cmake libglvnd-dev libproj-dev libvtk9-dev libvtk9-qt-dev qt6-base-dev qt6-base-dev-tools + run: sudo apt-get update && sudo apt-get install -y build-essential cmake libglvnd-dev libproj-dev libvtk9-dev qt6-base-dev qt6-base-dev-tools - name: Check installed versions run: cmake --version - name: Configure Simple From d40ee6de786e8bef3e567116ba1beb4dcb7e66d4 Mon Sep 17 00:00:00 2001 From: Adrian Schneider Date: Fri, 11 Oct 2024 16:06:59 +0200 Subject: [PATCH 2/3] Update cppVTK9DicomGUI.yml --- .github/workflows/cppVTK9DicomGUI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cppVTK9DicomGUI.yml b/.github/workflows/cppVTK9DicomGUI.yml index 268c950..c7aaf90 100644 --- a/.github/workflows/cppVTK9DicomGUI.yml +++ b/.github/workflows/cppVTK9DicomGUI.yml @@ -8,7 +8,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Install packages - run: sudo apt-get update && sudo apt-get install -y build-essential cmake libglvnd-dev libproj-dev libvtk9-dev qt6-base-dev qt6-base-dev-tools + run: sudo apt-get update && sudo apt-get install -y build-essential cmake libglvnd-dev libproj-dev libvtk9-dev qt6-base-dev qt6-base-dev-tools qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools - name: Check installed versions run: cmake --version - name: Configure Simple From 30989ccae534dbb048dfa880949f7d7ff5ca78f3 Mon Sep 17 00:00:00 2001 From: Adrian Schneider Date: Fri, 11 Oct 2024 16:10:18 +0200 Subject: [PATCH 3/3] Reverse - use Qt5 again --- gui/CMakeLists.txt | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 07258fc..0863f56 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -1,30 +1,26 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.0 ) project(dicom2meshgui) -# Enable necessary CMake features -set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) - -# Find Qt6 libraries -find_package(Qt6Widgets REQUIRED) +SET(CMAKE_INCLUDE_CURRENT_DIR ON) +SET(CMAKE_AUTOMOC ON) +SET(CMAKE_AUTORCC ON) +find_package(Qt5Widgets REQUIRED) find_package(VTK REQUIRED) + IF("${VTK_MAJOR_VERSION}" LESS 9) - include(${VTK_USE_FILE}) + include( ${VTK_USE_FILE} ) ENDIF("${VTK_MAJOR_VERSION}" LESS 9) -# Specify sources and UI files -set(APP_SOURCES main.cpp d2mWidget.cpp dicomConverter.cpp rsc/dicom2meshgui.qrc) -set(APP_UIS d2mWidget.ui) -set(APP_INCLUDE_DIRS .) - -include_directories(${APP_INCLUDE_DIRS}) +SET( APP_SOURCES main.cpp d2mWidget.cpp dicomConverter.cpp rsc/dicom2meshgui.qrc) +SET( APP_UIS d2mWidget.ui ) +SET( APP_INCLUDE_DIRS . ) -qt_wrap_ui(APP_FORMS_HEADERS ${APP_UIS}) +include_directories( ${APP_INCLUDE_DIRS} ) -add_executable(dicom2meshgui ${APP_SOURCES} ${APP_FORMS_HEADERS}) -target_link_libraries(dicom2meshgui dicom2meshlib Qt6::Widgets) +QT5_WRAP_UI(APP_FORMS_HEADERS ${APP_UIS} ) -target_compile_features(dicom2meshgui PRIVATE cxx_std_17) +add_executable(dicom2meshgui ${APP_SOURCES} ${APP_FORMS_HEADERS} ) +target_link_libraries(dicom2meshgui dicom2meshlib Qt5::Widgets) +target_compile_features(dicom2meshgui PRIVATE cxx_std_17 )