diff --git a/CMakeLists.txt b/CMakeLists.txt index bf12898..6fc94ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,12 +8,12 @@ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) endif() option(ENABLE_QT4 "Building Qt4 plugin." OFF) -option(ENABLE_QT5 "Building Qt5 plugin." OFF) +option(ENABLE_QT5 "Building Qt5 plugin." ON) option(WITHOUT_KF "Compiling without KDE Frameworks..." OFF) add_subdirectory(style) if(NOT ENABLE_QT4) - if(NOT ENABLE_QT5) + if(ENABLE_QT5) add_subdirectory(kvantumpreview) add_subdirectory(kvantummanager) add_subdirectory(themes) diff --git a/kvantummanager/CMakeLists.txt b/kvantummanager/CMakeLists.txt index 89e2558..c5d61c0 100644 --- a/kvantummanager/CMakeLists.txt +++ b/kvantummanager/CMakeLists.txt @@ -1,12 +1,11 @@ set(QT5_MINIMUM_VERSION "5.15.0") set(QT6_MINIMUM_VERSION "6.2.0") -if(NOT ENABLE_QT5) - set(QT_VERSION_MAJOR 6) - find_package(Qt6 "${QT6_MINIMUM_VERSION}" REQUIRED COMPONENTS Core Gui Widgets Svg) -else() +if(ENABLE_QT5) set(QT_VERSION_MAJOR 5) find_package(Qt5 "${QT5_MINIMUM_VERSION}" REQUIRED COMPONENTS Core Gui Widgets Svg) +else() + message(FATAL_ERROR "Non-Qt5 is not supported in this build.") endif() find_package(Qt${QT_VERSION_MAJOR} QUIET COMPONENTS LinguistTools) diff --git a/kvantumpreview/CMakeLists.txt b/kvantumpreview/CMakeLists.txt index ab934b5..30c493a 100644 --- a/kvantumpreview/CMakeLists.txt +++ b/kvantumpreview/CMakeLists.txt @@ -1,12 +1,11 @@ set(QT5_MINIMUM_VERSION "5.15.0") set(QT6_MINIMUM_VERSION "6.2.0") -if(NOT ENABLE_QT5) - set(QT_VERSION_MAJOR 6) - find_package(Qt6 "${QT6_MINIMUM_VERSION}" REQUIRED COMPONENTS Core Gui Widgets) -else() +if(ENABLE_QT5) set(QT_VERSION_MAJOR 5) find_package(Qt5 "${QT5_MINIMUM_VERSION}" REQUIRED COMPONENTS Core Gui Widgets) +else() + message(FATAL_ERROR "Non-Qt5 is not supported in this build.") endif() find_package(Qt${QT_VERSION_MAJOR} QUIET COMPONENTS LinguistTools) diff --git a/style/CMakeLists.txt b/style/CMakeLists.txt index e59cb61..48c6e47 100644 --- a/style/CMakeLists.txt +++ b/style/CMakeLists.txt @@ -4,25 +4,15 @@ set(KF5_MINIMUM_VERSION "5.82.0") set(KF6_MINIMUM_VERSION "6.0.0") if(NOT ENABLE_QT4) - if(NOT ENABLE_QT5) - set(QT_VERSION_MAJOR 6) - find_package(Qt6 "${QT6_MINIMUM_VERSION}" REQUIRED COMPONENTS Core Gui Widgets Svg) - if(NOT WITHOUT_KF) - find_package(KF6WindowSystem "${KF6_MINIMUM_VERSION}" REQUIRED) - endif() - else() + if(ENABLE_QT5) set(QT_VERSION_MAJOR 5) find_package(Qt5 "${QT5_MINIMUM_VERSION}" REQUIRED COMPONENTS Core Gui Widgets Svg X11Extras) if(NOT WITHOUT_KF) - find_package(KF5WindowSystem "${KF5_MINIMUM_VERSION}" REQUIRED) + find_package(KF5WindowSystem "${KF5_MINIMUM_VERSION}" REQUIRED) endif() + else() + message(FATAL_ERROR "Non-Qt5 is not supported in this build.") endif() -else() - set(QT_VERSION_MAJOR 4) - find_package(Qt4 4.8.7 REQUIRED) - - include(${QT_USE_FILE}) - add_definitions(${QT_DEFINITIONS}) endif() find_package(X11 REQUIRED)