summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-07-21 19:59:07 (GMT)
committerMontel Laurent <montel@kde.org>2016-07-21 19:59:07 (GMT)
commit95a0a8036612ca742062e200fcc82e1f93a1526c (patch)
treecfdb9cdc7f80a2f0161afc5a483b4ec24323a09a
parent8ed357427baa2d027323bf275b555774f77395bf (diff)
Start to migrate to kdiagram
-rw-r--r--CMakeLists.txt14
-rw-r--r--src/CMakeLists.txt12
2 files changed, 23 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0299313..5079ce2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,6 +22,8 @@ include(ECMAddTests)
set(PIM_VERSION "5.3.40")
+option(KDIAGRAM_SUPPORT "Enable it to test build against KDIAGRAM" FALSE)
+
set(EVENTVIEW_LIB_VERSION ${PIM_VERSION})
set(CALENDARUTILS_LIB_VERSION "5.2.80")
set(AKONADI_LIB_VERSION "5.2.80")
@@ -31,7 +33,6 @@ set(AKONADICALENDAR_LIB_VERSION "5.2.80")
set(KMIME_LIB_VERSION "5.2.80")
set(IDENTITYMANAGEMENT_LIB_VERSION "5.2.80")
set(LIBKDEPIM_LIB_VERSION "5.2.80")
-set(KDGANTT2_LIB_VERSION "5.2.80")
set(CALENDARSUPPORT_LIB_VERSION "5.2.80")
find_package(KF5Akonadi ${AKONADI_LIB_VERSION} CONFIG REQUIRED)
@@ -39,7 +40,16 @@ find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test UiTools)
find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Codecs ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Libkdepim ${LIBKDEPIM_LIB_VERSION} CONFIG REQUIRED)
-find_package(KF5KDGantt2 ${KDGANTT2_LIB_VERSION} CONFIG REQUIRED)
+
+if (KDIAGRAM_SUPPORT)
+ set(KDIAGRAM_LIB_VERSION "1.4.0")
+ find_package(KGantt ${KDIAGRAM_LIB_VERSION} CONFIG REQUIRED)
+ add_definitions(-DKDIAGRAM_SUPPORT)
+else()
+ set(KDGANTT2_LIB_VERSION "5.2.80")
+ find_package(KF5KDGantt2 ${KDGANTT2_LIB_VERSION} CONFIG REQUIRED)
+endif()
+
find_package(KF5CalendarUtils ${CALENDARUTILS_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5CalendarCore ${KCALENDARCORE_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5CalendarSupport ${CALENDARSUPPORT_LIB_VERSION} CONFIG REQUIRED)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9f43ba6..abe6f22 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -83,6 +83,16 @@ add_library(KF5EventViews ${eventviews_LIB_SRCS})
generate_export_header(KF5EventViews BASE_NAME eventviews)
add_library(KF5::EventViews ALIAS KF5EventViews)
+
+if (KDIAGRAM_SUPPORT)
+ set(grant_lib KGantt)
+else()
+ set(grant_lib KF5::KDGantt2)
+endif()
+
+
+set(grant_lib KF5::KDGantt2)
+
target_link_libraries(KF5EventViews
PUBLIC
KF5::AkonadiCore
@@ -94,7 +104,7 @@ PUBLIC
PRIVATE
KF5::Libkdepim
KF5::Codecs
- KF5::KDGantt2
+ ${grant_lib}
KF5::AkonadiWidgets
)