From 57cd770629c94d3c650c2917fb383d58b9440f5c Mon Sep 17 00:00:00 2001 From: mhogomchungu Date: Fri, 7 Jun 2024 13:27:46 +0300 Subject: [PATCH] update build system to make it compile on Qt6 --- CMakeLists.txt | 7 +++++++ plugins/CMakeLists.txt | 5 ----- plugins/keydialog-qt/CMakeLists.txt | 5 ----- zuluCrypt-gui/CMakeLists.txt | 5 ----- zuluCrypt-gui/sharedObjects/CMakeLists.txt | 5 ----- zuluMount-gui/CMakeLists.txt | 5 ----- 6 files changed, 7 insertions(+), 25 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea29d1de..c470f928 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -358,6 +358,13 @@ if( NOT NOGUI ) endif() if( BUILD_WITH_QT6 ) + + set(CMAKE_INCLUDE_CURRENT_DIR ON) + + set(CMAKE_AUTOMOC ON) + set(CMAKE_AUTORCC ON) + set(CMAKE_AUTOUIC ON) + message( STATUS "Found Qt5Widgets, version ${Qt6Widgets_VERSION}" ) message( STATUS "Found Qt5Core, version ${Qt6Core_VERSION}" ) message( STATUS "Found Qt5Network, version ${Qt6Network_VERSION}" ) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 3cd3516a..051853d9 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -25,11 +25,6 @@ set( CMAKE_CXX_EXTENSIONS OFF) if(BUILD_WITH_QT6) - set(CMAKE_INCLUDE_CURRENT_DIR ON) - set(CMAKE_AUTOMOC ON) - set(CMAKE_AUTORCC ON) - set(CMAKE_AUTOUIC ON) - add_library( plugin STATIC mainwindow.h mainwindow.ui mainwindow.cpp ) else() QT5_WRAP_UI( UI mainwindow.ui ) diff --git a/plugins/keydialog-qt/CMakeLists.txt b/plugins/keydialog-qt/CMakeLists.txt index ee778f7c..c8628b60 100644 --- a/plugins/keydialog-qt/CMakeLists.txt +++ b/plugins/keydialog-qt/CMakeLists.txt @@ -7,11 +7,6 @@ endif() add_definitions( -D_FILE_OFFSET_BITS=64 -Wall -pedantic -std=c++11 -I${PROJECT_BINARY_DIR}/plugins/keydialog-qt -I${PROJECT_BINARY_DIR} ) if(BUILD_WITH_QT6) - - set(CMAKE_AUTOMOC ON) - set(CMAKE_AUTORCC ON) - set(CMAKE_AUTOUIC ON) - add_executable( keydialog-qt icon.qrc mainwindow.h mainwindow.ui main.cpp mainwindow.cpp ) TARGET_LINK_LIBRARIES( keydialog-qt sharedObject ${Qt6Widgets_LIBRARIES} ${Qt6Core_LIBRARIES} zuluCryptPluginManager ${blkid} ) set_target_properties( keydialog-qt PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" ) diff --git a/zuluCrypt-gui/CMakeLists.txt b/zuluCrypt-gui/CMakeLists.txt index 3b170066..18c06dc1 100644 --- a/zuluCrypt-gui/CMakeLists.txt +++ b/zuluCrypt-gui/CMakeLists.txt @@ -89,11 +89,6 @@ INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} ) if(BUILD_WITH_QT6) - set(CMAKE_INCLUDE_CURRENT_DIR ON) - set(CMAKE_AUTOMOC ON) - set(CMAKE_AUTORCC ON) - set(CMAKE_AUTOUIC ON) - add_executable( zuluCrypt-gui ${MOC_FILES} ${UI_FILES} ${SRC} icon.qrc ) set_target_properties( zuluCrypt-gui PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}" ) diff --git a/zuluCrypt-gui/sharedObjects/CMakeLists.txt b/zuluCrypt-gui/sharedObjects/CMakeLists.txt index 178bb6fd..ecb053dd 100644 --- a/zuluCrypt-gui/sharedObjects/CMakeLists.txt +++ b/zuluCrypt-gui/sharedObjects/CMakeLists.txt @@ -57,11 +57,6 @@ add_definitions( -D_FILE_OFFSET_BITS=64 -Wextra -Wall -pedantic -I${PROJECT_BINA if(BUILD_WITH_QT6) - set(CMAKE_INCLUDE_CURRENT_DIR ON) - set(CMAKE_AUTOMOC ON) - set(CMAKE_AUTORCC ON) - set(CMAKE_AUTOUIC ON) - add_library( sharedObject STATIC ${MOC_FILES} ${SRC} ${UI_FILES} icon.qrc ) if( BUILDKWALLET ) diff --git a/zuluMount-gui/CMakeLists.txt b/zuluMount-gui/CMakeLists.txt index ef01d4fb..e5e08b07 100644 --- a/zuluMount-gui/CMakeLists.txt +++ b/zuluMount-gui/CMakeLists.txt @@ -54,11 +54,6 @@ INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} ) if(BUILD_WITH_QT6) - set(CMAKE_INCLUDE_CURRENT_DIR ON) - set(CMAKE_AUTOMOC ON) - set(CMAKE_AUTORCC ON) - set(CMAKE_AUTOUIC ON) - include_directories( ${Qt6Widgets_INCLUDE_DIRS} ) add_definitions( ${Qt6Widgets_DEFINITIONS} )