Commit 2eda5712 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Clean up cmake and define sensible requirements

The currently stated requirements are unrealisticly old. Update to recent versions of cmake, C++, Qt and KF5
parent eabb367d
project(KAccounts)
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 2.8.12)
set(RELEASE_SERVICE_VERSION_MAJOR "21")
set(RELEASE_SERVICE_VERSION_MINOR "03")
set(RELEASE_SERVICE_VERSION_MICRO "70")
set(KACCOUNTS_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
project(KAccounts LANGUAGES CXX VERSION ${KACCOUNTS_VERSION})
set(QT_REQUIRED_VERSION "5.15.0")
set(KF5_MIN_VERSION "5.78.0")
set(QT_REQUIRED_VERSION "5.7.0")
set(KF5_MIN_VERSION "5.4.0")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
set(RELEASE_SERVICE_VERSION_MAJOR "21")
set(RELEASE_SERVICE_VERSION_MINOR "03")
set(RELEASE_SERVICE_VERSION_MICRO "70")
set(KACCOUNTS_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
set(KACCOUNTS_SOVERSION "2")
set(ACCOUNTSQT_DEP_VERSION "1.13")
set(SIGNONQT_DEP_VERSION "8.55")
......@@ -35,11 +39,9 @@ set_package_properties(SignOnQt5 PROPERTIES DESCRIPTION "D-Bus service which per
add_definitions (-DTRANSLATION_DOMAIN=\"kaccounts-integration\" -DQT_NO_KEYWORDS -DQT_NO_FOREACH)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMInstallIcons)
include(FeatureSummary)
include(ECMSetupVersion)
......@@ -52,8 +54,6 @@ if(KF5_VERSION VERSION_GREATER_EQUAL 5.79)
include(KDEGitCommitHooks)
endif()
include_directories(${ACCOUNTSQT_INCLUDE_DIRS} ${SIGNONQT_INCLUDE_DIRS})
add_subdirectory(src)
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
......
......@@ -3,9 +3,7 @@ add_library(kaccountsdeclarativeplugin SHARED kaccountsdeclarativeplugin.cpp)
target_link_libraries(kaccountsdeclarativeplugin Qt5::Qml
KF5::I18n
kaccounts
${SIGNONQT_LIBRARIES})
target_include_directories(kaccountsdeclarativeplugin PRIVATE "${SIGNONQT_INCLUDE_DIRS}")
)
install(TARGETS kaccountsdeclarativeplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kaccounts)
install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kaccounts)
set(accountsettings_SRCS
accounts.cpp
)
add_library(kcm_kaccounts MODULE ${accountsettings_SRCS})
add_library(kcm_kaccounts MODULE accounts.cpp)
target_link_libraries(kcm_kaccounts
Qt5::Core
......
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
kcoreaddons_add_plugin(
kded_accounts
SOURCES kded_accounts.cpp
......
......@@ -5,7 +5,7 @@
*/
#include "kded_accounts.h"
#include "src/lib/kaccountsdplugin.h"
#include "kaccountsdplugin.h"
#include <core.h>
#include <KPluginFactory>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment