Skip to content

Commit

Permalink
update build system to make it compile on Qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
mhogomchungu committed Jun 7, 2024
1 parent 6b12e18 commit 57cd770
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 25 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}" )
Expand Down
5 changes: 0 additions & 5 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
5 changes: 0 additions & 5 deletions plugins/keydialog-qt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}" )
Expand Down
5 changes: 0 additions & 5 deletions zuluCrypt-gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}" )
Expand Down
5 changes: 0 additions & 5 deletions zuluCrypt-gui/sharedObjects/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
5 changes: 0 additions & 5 deletions zuluMount-gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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} )
Expand Down

0 comments on commit 57cd770

Please sign in to comment.