Skip to content

Commit

Permalink
revisi the build system
Browse files Browse the repository at this point in the history
  • Loading branch information
mhogomchungu committed Dec 2, 2024
1 parent 5b68136 commit 264fd6d
Show file tree
Hide file tree
Showing 15 changed files with 67 additions and 27 deletions.
66 changes: 53 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.26.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()
Expand Down Expand Up @@ -375,22 +375,62 @@ if( NOT NOGUI )

add_subdirectory( external_libraries/lxqt_wallet )
else()
if( LXQT_WALLET_VERSION VERSION_GREATER "3.1.0" )
if( BUILD_WITH_QT6 )

include_directories( ${LXQT_WALLET_INCLUDEDIR} )
link_directories( ${LXQT_WALLET_LIBDIR} )
if( LXQT_WALLET_VERSION VERSION_LESS "4.0.2" )

# lxqt-wallet 4.0.0 renamed a header from "lxqtwallet.h" to "lxqt-wallet.h",
# so this is needed to choose the right header to include when compiling.
if( LXQT_WALLET_VERSION VERSION_GREATER "4.0.0" )
add_compile_definitions( LXQT_WALLET_HYPHEN_HEADER )
endif()
include_directories( external_libraries/lxqt_wallet )
include_directories( external_libraries/lxqt_wallet/frontend )
include_directories( external_libraries/lxqt_wallet/backend )

include_directories( ${PROJECT_BINARY_DIR}/external_libraries/lxqt_wallet/lxqt_wallet )
include_directories( ${PROJECT_BINARY_DIR}/external_libraries/lxqt_wallet/lxqt_wallet/frontend )
include_directories( ${PROJECT_BINARY_DIR}/external_libraries/lxqt_wallet/lxqt_wallet/backend )

add_subdirectory( external_libraries/lxqt_wallet )

message( STATUS "---------------------------------------------------------------------------" )
message( STATUS "WARNING: Qt6 build requires lxqt-wallet >= 4.0.2, switching to bundled version" )
message( STATUS "---------------------------------------------------------------------------" )
else()
# lxqt-wallet 4.0.0 renamed a header from "lxqtwallet.h" to "lxqt-wallet.h",
# so this is needed to choose the right header to include when compiling.

message( STATUS "---------------------------------------------------------------------------" )
message( STATUS "lxqt wallet support will be provided by an external libary" )
message( STATUS "---------------------------------------------------------------------------" )
if( LXQT_WALLET_VERSION VERSION_GREATER "4.0.0" )
add_compile_definitions( LXQT_WALLET_HYPHEN_HEADER )
endif()

include_directories( ${LXQT_WALLET_INCLUDEDIR} )
link_directories( ${LXQT_WALLET_LIBDIR} )

message( STATUS "---------------------------------------------------------------------------" )
message( STATUS "lxqt wallet support will be provided by an external libary" )
message( STATUS "---------------------------------------------------------------------------" )
endif()
else()
message( FATAL_ERROR "---------------------------------------------------------------------------\nInstalled version of lxqt_wallet is too old(<3.2.0)\nPlease install a more receant version from: https://github.com/lxqt/lxqt_wallet\n---------------------------------------------------------------------------" )
if( LXQT_WALLET_VERSION VERSION_GREATER "3.1.0" )

include_directories( ${LXQT_WALLET_INCLUDEDIR} )
link_directories( ${LXQT_WALLET_LIBDIR} )

message( STATUS "---------------------------------------------------------------------------" )
message( STATUS "lxqt wallet support will be provided by an external libary" )
message( STATUS "---------------------------------------------------------------------------" )
else()
include_directories( external_libraries/lxqt_wallet )
include_directories( external_libraries/lxqt_wallet/frontend )
include_directories( external_libraries/lxqt_wallet/backend )

include_directories( ${PROJECT_BINARY_DIR}/external_libraries/lxqt_wallet/lxqt_wallet )
include_directories( ${PROJECT_BINARY_DIR}/external_libraries/lxqt_wallet/lxqt_wallet/frontend )
include_directories( ${PROJECT_BINARY_DIR}/external_libraries/lxqt_wallet/lxqt_wallet/backend )

add_subdirectory( external_libraries/lxqt_wallet )

message( STATUS "---------------------------------------------------------------------------" )
message( STATUS "lxqt wallet support will be provided by an internal libary" )
message( STATUS "---------------------------------------------------------------------------" )
endif()
endif()
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion external_libraries/tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.26.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()
Expand Down
2 changes: 1 addition & 1 deletion plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.26.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()
Expand Down
2 changes: 1 addition & 1 deletion plugins/gpg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.26.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()
Expand Down
2 changes: 1 addition & 1 deletion plugins/hmac/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.26.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()
Expand Down
2 changes: 1 addition & 1 deletion plugins/keydialog-qt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.26.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()
Expand Down
2 changes: 1 addition & 1 deletion plugins/keykeyfile/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.26.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()
Expand Down
2 changes: 1 addition & 1 deletion plugins/steghide/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.26.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()
Expand Down
2 changes: 1 addition & 1 deletion plugins/tomb/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.26.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()
Expand Down
2 changes: 1 addition & 1 deletion zuluCrypt-cli/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.26.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()
Expand Down
2 changes: 1 addition & 1 deletion zuluCrypt-gui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.26.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()
Expand Down
2 changes: 1 addition & 1 deletion zuluCrypt-gui/sharedObjects/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.26.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()
Expand Down
2 changes: 1 addition & 1 deletion zuluMount-gui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.26.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()
Expand Down
2 changes: 1 addition & 1 deletion zuluPolkit/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.26.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()
Expand Down
2 changes: 1 addition & 1 deletion zuluSafe/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.26.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()
Expand Down

0 comments on commit 264fd6d

Please sign in to comment.