Commit 1d7f24fe authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Misc cmake cleanup

Remove some unneeded things.
Set C++ version to 17.
Set somewhat sensible min versions for Qt and KF5
Pass version and languages to project()
parent 5b3107d3
project(kde-account-providers)
cmake_minimum_required(VERSION 3.5)
set(RELEASE_SERVICE_VERSION_MAJOR "20")
......@@ -7,11 +5,16 @@ set(RELEASE_SERVICE_VERSION_MINOR "11")
set(RELEASE_SERVICE_VERSION_MICRO "70")
set(KACCOUNTS_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
set(QT_REQUIRED_VERSION "5.2.0")
set(KF5_MIN_VERSION "5.4.0")
project(kde-account-providers LANGUAGES CXX VERSION ${KACCOUNTS_VERSION})
set(QT_REQUIRED_VERSION "5.12.0")
set(KF5_MIN_VERSION "5.70.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 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_PATH})
find_package(Intltool REQUIRED)
find_package(KAccounts REQUIRED)
......
set(nextcloud_plugin_kaccounts_SRCS
nextcloud.cpp
nextcloudcontroller.cpp
)
add_library(nextcloud_plugin_kaccounts MODULE
${nextcloud_plugin_kaccounts_SRCS}
nextcloud.cpp
nextcloudcontroller.cpp
)
target_link_libraries(nextcloud_plugin_kaccounts
......
include_directories(${CMAKE_CURRENT_BUILD_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
set(owncloud_plugin_kaccounts_SRCS
add_library(owncloud_plugin_kaccounts MODULE
owncloud.cpp
owncloudcontroller.cpp
)
add_library(owncloud_plugin_kaccounts MODULE
${owncloud_plugin_kaccounts_SRCS}
)
target_link_libraries(owncloud_plugin_kaccounts
Qt5::Core
KF5::KIOCore
KF5::I18n
KF5::Declarative
KAccounts
${ACCOUNTSQT_LIBRARIES}
${SIGNONQT_LIBRARIES}
)
# Install:
install(TARGETS owncloud_plugin_kaccounts
DESTINATION ${PLUGIN_INSTALL_DIR}/kaccounts/ui
)
......
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