summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeo Mrnjavac <[email protected]>2014-03-07 13:53:38 +0100
committerTeo Mrnjavac <[email protected]>2014-03-07 15:32:33 +0100
commit0c70264cb3c9b2415a2dafa0025431390a4c7a45 (patch)
tree87e3c559fd162bac32165be205ef6839df72b4bb
parent65e696695d4242739a842e92af5fd14e56006244 (diff)
Initial CMake changes for KF5
-rw-r--r--CMakeLists.txt54
-rw-r--r--CTestConfig.cmake4
2 files changed, 39 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4de460c..5e9db59 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,26 +1,46 @@
-project(kwallet)
-
-if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
- find_package(KDE4)
- include( KDE4Defaults )
- include_directories(${KDE4_INCLUDES})
-
- add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
- add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
-
- # If definitions like -D_GNU_SOURCE are needed for these checks they
- # should be added to _KDE4_PLATFORM_DEFINITIONS when it is originally
- # defined outside this file. Here we include these definitions in
- # CMAKE_REQUIRED_DEFINITIONS so they will be included in the build of
- # checks below.
- set( CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS} )
+project(kwalletmanager)
+
+cmake_minimum_required(VERSION 2.8.12)
+
+find_package(ECM 0.0.9 REQUIRED NO_MODULE)
+
+set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
+
+set(REQUIRED_QT_VERSION 5.2.0)
+find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Gui Widgets DBus Test)
+
+option(BUILD_TESTS "Build KWalletManager with unit tests" ON)
+
+set(KF5_VERSION "4.96.0")
+include(KDEInstallDirs)
+include(KDEFrameworkCompilerSettings)
+include(KDECMakeSettings)
+include(FeatureSummary)
+include(GenerateExportHeader)
+include(ECMSetupVersion)
+include(ECMGenerateHeaders)
+
+if(NOT kdelibs_SOURCE_DIR)
+ find_package(KF5 ${KF5_VERSION} REQUIRED
+ CoreAddons
+ DocTools
+# WidgetsAddons
+# Service
+# Config
+# WindowSystem
+# I18n
+# KDE4Support #KUniqueApplication in ksecretsserviced
+ )
endif()
add_subdirectory( doc )
add_subdirectory( icons )
add_subdirectory( src )
+if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
+ feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
+endif()
########### install files ###############
-
install( PROGRAMS kwalletmanager.desktop kwalletmanager-kwalletd.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
+
diff --git a/CTestConfig.cmake b/CTestConfig.cmake
index 17d60cd..ec806e4 100644
--- a/CTestConfig.cmake
+++ b/CTestConfig.cmake
@@ -4,10 +4,10 @@
## # The following are required to uses Dart and the Cdash dashboard
## ENABLE_TESTING()
## INCLUDE(CTest)
-set(CTEST_PROJECT_NAME "kwallet")
+set(CTEST_PROJECT_NAME "kwalletmanager")
set(CTEST_NIGHTLY_START_TIME "20:00:00 CET")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "my.cdash.org")
-set(CTEST_DROP_LOCATION "/submit.php?project=kwallet")
+set(CTEST_DROP_LOCATION "/submit.php?project=kwalletmanager")
set(CTEST_DROP_SITE_CDASH TRUE)