summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2016-04-18 13:35:54 +0200
committerMontel Laurent <[email protected]>2016-04-18 13:35:54 +0200
commitfe82a8c43749cf628fa6b1523ad0dab078c5389b (patch)
tree6698f5f98b8cc467e762118a2f0fae5ba34f4edb
parentd8462e2a994b347138defe91040e173cdeb50c8b (diff)
Add check for building as standalone
-rw-r--r--grantleeeditor/CMakeLists.txt62
1 files changed, 62 insertions, 0 deletions
diff --git a/grantleeeditor/CMakeLists.txt b/grantleeeditor/CMakeLists.txt
index af5037c..42103f9 100644
--- a/grantleeeditor/CMakeLists.txt
+++ b/grantleeeditor/CMakeLists.txt
@@ -1,5 +1,67 @@
project(grantleeditor)
+if(${CMAKE_SOURCE_DIR} STREQUAL ${grantleeditor_SOURCE_DIR})
+ cmake_minimum_required(VERSION 2.8.12)
+ find_package(ECM 5.20.0 REQUIRED NO_MODULE)
+ set(CMAKE_MODULE_PATH ${grantleeditor_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
+ include(ECMInstallIcons)
+
+ include(ECMOptionalAddSubdirectory)
+ include(ECMSetupVersion)
+ include(ECMAddTests)
+ include(ECMMarkNonGuiExecutable)
+ include(GenerateExportHeader)
+ include(ECMGenerateHeaders)
+ include(CMakePackageConfigHelpers)
+ include(FeatureSummary)
+ include(CheckFunctionExists)
+ include(ECMGeneratePriFile)
+
+ include(KDEInstallDirs)
+ include(KDECMakeSettings)
+ include(KDECompilerSettings NO_POLICY_SCOPE)
+ include(ECMAddAppIcon)
+ include(ECMQtDeclareLoggingCategory)
+
+
+ set(KF5_VERSION "5.20.0")
+
+ set(KDEPIM_VERSION_NUMBER "5.2.42")
+ set(KDEPIM_VERSION "${KDEPIM_VERSION_NUMBER}${KDEPIM_DEV_VERSION}")
+
+
+ set(KDEPIMLIBS_LIB_VERSION "5.2.40")
+ set(KPIMTEXTEDIT_LIB_VERSION "5.2.40")
+ set(KBLOG_LIB_VERSION "5.2.40")
+ set(KDEPIM_LIB_VERSION "${KDEPIM_VERSION_NUMBER}")
+ set(KDEPIM_LIB_SOVERSION "5")
+ set(KDEPIM_APPS_LIB_VERSION_LIB "5.2.42")
+
+ set(QT_REQUIRED_VERSION "5.6.0")
+ find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test Sql)
+ find_package(Qt5X11Extras NO_MODULE)
+ set(MAILCOMMON_LIB_VERSION_LIB "5.2.40")
+ set(PIMCOMMON_LIB_VERSION_LIB "5.2.40")
+ set(LIBKDEPIM_LIB_VERSION_LIB "5.2.40")
+ # Find KF5 package
+ find_package(KF5DBusAddons ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5DocTools REQUIRED)
+ find_package(KF5XmlGui ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5TextEditor ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5Wallet ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION_LIB} CONFIG REQUIRED)
+
+
+
+ # Find KdepimLibs Package
+ find_package(KF5Blog ${KBLOG_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5PimTextEdit ${KPIMTEXTEDIT_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION_LIB} CONFIG REQUIRED)
+
+ include_directories(${grantleeditor_SOURCE_DIR} ${grantleeditor_BINARY_DIR})
+endif()
+
+
add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )