summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-09-16 07:40:28 +0200
committerMontel Laurent <[email protected]>2015-09-16 07:40:28 +0200
commitad12e753d26cad5e35b790d567e411ed548307bd (patch)
tree244aced12208089f2e5ce9abbfb31e43f5333bf8
parentd01f426b928bdd7402f489f5f6d837e5e90b2cbd (diff)
Make as installable lib
-rw-r--r--eventviews/src/CMakeLists.txt2
-rw-r--r--eventviews/src/timeline/timelineitem.cpp2
-rw-r--r--eventviews/src/timeline/timelineview.cpp12
-rw-r--r--eventviews/src/timeline/timelineview_p.cpp2
-rw-r--r--incidenceeditor-ng/autotests/CMakeLists.txt2
-rw-r--r--incidenceeditor-ng/autotests/testfreebusyganttproxymodel.cpp2
-rw-r--r--incidenceeditor-ng/src/CMakeLists.txt2
-rw-r--r--incidenceeditor-ng/src/freebusyganttproxymodel.cpp2
-rw-r--r--incidenceeditor-ng/src/resourcemanagement.cpp8
-rw-r--r--incidenceeditor-ng/src/visualfreebusywidget.cpp8
-rw-r--r--kdgantt2/CMakeLists.txt124
-rw-r--r--kdgantt2/KF5KDGantt2Config.cmake.in3
-rw-r--r--kdgantt2/src/CMakeLists.txt99
-rw-r--r--kdgantt2/src/Messages.sh (renamed from kdgantt2/Messages.sh)0
-rw-r--r--kdgantt2/src/docs.h (renamed from kdgantt2/docs.h)0
-rw-r--r--kdgantt2/src/kdganttabstractgrid.cpp (renamed from kdgantt2/kdganttabstractgrid.cpp)0
-rw-r--r--kdgantt2/src/kdganttabstractgrid.h (renamed from kdgantt2/kdganttabstractgrid.h)0
-rw-r--r--kdgantt2/src/kdganttabstractgrid_p.h (renamed from kdgantt2/kdganttabstractgrid_p.h)0
-rw-r--r--kdgantt2/src/kdganttabstractrowcontroller.cpp (renamed from kdgantt2/kdganttabstractrowcontroller.cpp)0
-rw-r--r--kdgantt2/src/kdganttabstractrowcontroller.h (renamed from kdgantt2/kdganttabstractrowcontroller.h)0
-rw-r--r--kdgantt2/src/kdganttconstraint.cpp (renamed from kdgantt2/kdganttconstraint.cpp)0
-rw-r--r--kdgantt2/src/kdganttconstraint.h (renamed from kdgantt2/kdganttconstraint.h)0
-rw-r--r--kdgantt2/src/kdganttconstraint_p.h (renamed from kdgantt2/kdganttconstraint_p.h)0
-rw-r--r--kdgantt2/src/kdganttconstraintgraphicsitem.cpp (renamed from kdgantt2/kdganttconstraintgraphicsitem.cpp)0
-rw-r--r--kdgantt2/src/kdganttconstraintgraphicsitem.h (renamed from kdgantt2/kdganttconstraintgraphicsitem.h)0
-rw-r--r--kdgantt2/src/kdganttconstraintmodel.cpp (renamed from kdgantt2/kdganttconstraintmodel.cpp)0
-rw-r--r--kdgantt2/src/kdganttconstraintmodel.h (renamed from kdgantt2/kdganttconstraintmodel.h)0
-rw-r--r--kdgantt2/src/kdganttconstraintmodel_p.h (renamed from kdgantt2/kdganttconstraintmodel_p.h)0
-rw-r--r--kdgantt2/src/kdganttconstraintproxy.cpp (renamed from kdgantt2/kdganttconstraintproxy.cpp)0
-rw-r--r--kdgantt2/src/kdganttconstraintproxy.h (renamed from kdgantt2/kdganttconstraintproxy.h)0
-rw-r--r--kdgantt2/src/kdganttdatetimegrid.cpp (renamed from kdgantt2/kdganttdatetimegrid.cpp)0
-rw-r--r--kdgantt2/src/kdganttdatetimegrid.h (renamed from kdgantt2/kdganttdatetimegrid.h)0
-rw-r--r--kdgantt2/src/kdganttdatetimegrid_p.h (renamed from kdgantt2/kdganttdatetimegrid_p.h)0
-rw-r--r--kdgantt2/src/kdganttforwardingproxymodel.cpp (renamed from kdgantt2/kdganttforwardingproxymodel.cpp)0
-rw-r--r--kdgantt2/src/kdganttforwardingproxymodel.h (renamed from kdgantt2/kdganttforwardingproxymodel.h)0
-rw-r--r--kdgantt2/src/kdganttglobal.cpp (renamed from kdgantt2/kdganttglobal.cpp)0
-rw-r--r--kdgantt2/src/kdganttglobal.h (renamed from kdgantt2/kdganttglobal.h)0
-rw-r--r--kdgantt2/src/kdganttgraphicsitem.cpp (renamed from kdgantt2/kdganttgraphicsitem.cpp)0
-rw-r--r--kdgantt2/src/kdganttgraphicsitem.h (renamed from kdgantt2/kdganttgraphicsitem.h)0
-rw-r--r--kdgantt2/src/kdganttgraphicsscene.cpp (renamed from kdgantt2/kdganttgraphicsscene.cpp)0
-rw-r--r--kdgantt2/src/kdganttgraphicsscene.h (renamed from kdgantt2/kdganttgraphicsscene.h)0
-rw-r--r--kdgantt2/src/kdganttgraphicsscene_p.h (renamed from kdgantt2/kdganttgraphicsscene_p.h)0
-rw-r--r--kdgantt2/src/kdganttgraphicsview.cpp (renamed from kdgantt2/kdganttgraphicsview.cpp)0
-rw-r--r--kdgantt2/src/kdganttgraphicsview.h (renamed from kdgantt2/kdganttgraphicsview.h)0
-rw-r--r--kdgantt2/src/kdganttgraphicsview_p.h (renamed from kdgantt2/kdganttgraphicsview_p.h)0
-rw-r--r--kdgantt2/src/kdganttitemdelegate.cpp (renamed from kdgantt2/kdganttitemdelegate.cpp)0
-rw-r--r--kdgantt2/src/kdganttitemdelegate.h (renamed from kdgantt2/kdganttitemdelegate.h)0
-rw-r--r--kdgantt2/src/kdganttitemdelegate_p.h (renamed from kdgantt2/kdganttitemdelegate_p.h)0
-rw-r--r--kdgantt2/src/kdganttlegend.cpp (renamed from kdgantt2/kdganttlegend.cpp)0
-rw-r--r--kdgantt2/src/kdganttlegend.h (renamed from kdgantt2/kdganttlegend.h)0
-rw-r--r--kdgantt2/src/kdganttlegend_p.h (renamed from kdgantt2/kdganttlegend_p.h)0
-rw-r--r--kdgantt2/src/kdganttlistviewrowcontroller.cpp (renamed from kdgantt2/kdganttlistviewrowcontroller.cpp)0
-rw-r--r--kdgantt2/src/kdganttlistviewrowcontroller.h (renamed from kdgantt2/kdganttlistviewrowcontroller.h)0
-rw-r--r--kdgantt2/src/kdganttlistviewrowcontroller_p.h (renamed from kdgantt2/kdganttlistviewrowcontroller_p.h)0
-rw-r--r--kdgantt2/src/kdganttproxymodel.cpp (renamed from kdgantt2/kdganttproxymodel.cpp)0
-rw-r--r--kdgantt2/src/kdganttproxymodel.h (renamed from kdgantt2/kdganttproxymodel.h)0
-rw-r--r--kdgantt2/src/kdganttproxymodel_p.h (renamed from kdgantt2/kdganttproxymodel_p.h)0
-rw-r--r--kdgantt2/src/kdganttstyleoptionganttitem.cpp (renamed from kdgantt2/kdganttstyleoptionganttitem.cpp)0
-rw-r--r--kdgantt2/src/kdganttstyleoptionganttitem.h (renamed from kdgantt2/kdganttstyleoptionganttitem.h)0
-rw-r--r--kdgantt2/src/kdganttsummaryhandlingproxymodel.cpp (renamed from kdgantt2/kdganttsummaryhandlingproxymodel.cpp)0
-rw-r--r--kdgantt2/src/kdganttsummaryhandlingproxymodel.h (renamed from kdgantt2/kdganttsummaryhandlingproxymodel.h)0
-rw-r--r--kdgantt2/src/kdganttsummaryhandlingproxymodel_p.h (renamed from kdgantt2/kdganttsummaryhandlingproxymodel_p.h)0
-rw-r--r--kdgantt2/src/kdgantttreeviewrowcontroller.cpp (renamed from kdgantt2/kdgantttreeviewrowcontroller.cpp)0
-rw-r--r--kdgantt2/src/kdgantttreeviewrowcontroller.h (renamed from kdgantt2/kdgantttreeviewrowcontroller.h)0
-rw-r--r--kdgantt2/src/kdgantttreeviewrowcontroller_p.h (renamed from kdgantt2/kdgantttreeviewrowcontroller_p.h)0
-rw-r--r--kdgantt2/src/kdganttview.cpp (renamed from kdgantt2/kdganttview.cpp)0
-rw-r--r--kdgantt2/src/kdganttview.h (renamed from kdgantt2/kdganttview.h)0
-rw-r--r--kdgantt2/src/kdganttview_p.h (renamed from kdgantt2/kdganttview_p.h)0
68 files changed, 197 insertions, 71 deletions
diff --git a/eventviews/src/CMakeLists.txt b/eventviews/src/CMakeLists.txt
index b6b1d47..b552576 100644
--- a/eventviews/src/CMakeLists.txt
+++ b/eventviews/src/CMakeLists.txt
@@ -94,7 +94,7 @@ PUBLIC
PRIVATE
KF5::Libkdepim
KF5::Codecs
- kdgantt2
+ KF5::KDGantt2
KF5::AkonadiWidgets
)
diff --git a/eventviews/src/timeline/timelineitem.cpp b/eventviews/src/timeline/timelineitem.cpp
index c79acbc..627022b 100644
--- a/eventviews/src/timeline/timelineitem.cpp
+++ b/eventviews/src/timeline/timelineitem.cpp
@@ -20,7 +20,7 @@
#include "timelineitem.h"
-#include <kdgantt2/kdganttglobal.h>
+#include <KDGantt2/KDGanttGlobal>
#include <CalendarSupport/KCalPrefs>
diff --git a/eventviews/src/timeline/timelineview.cpp b/eventviews/src/timeline/timelineview.cpp
index b2c3954..bd071f5 100644
--- a/eventviews/src/timeline/timelineview.cpp
+++ b/eventviews/src/timeline/timelineview.cpp
@@ -27,12 +27,12 @@
#include "timelineitem.h"
#include "helper.h"
-#include <kdgantt2/kdganttgraphicsitem.h>
-#include <kdgantt2/kdganttgraphicsview.h>
-#include <kdgantt2/kdganttabstractrowcontroller.h>
-#include <kdgantt2/kdganttdatetimegrid.h>
-#include <kdgantt2/kdganttitemdelegate.h>
-#include <kdgantt2/kdganttstyleoptionganttitem.h>
+#include <KDGantt2/KDGanttGraphicsItem>
+#include <KDGantt2/KDGanttGraphicsView>
+#include <KDGantt2/KDGanttAbstractRowController>
+#include <KDGantt2/KDGanttDateTimeGrid>
+#include <KDGantt2/KDGanttItemDelegate>
+#include <KDGantt2/KDGanttStyleOptionGanttItem>
#include <Akonadi/Calendar/ETMCalendar>
#include <CalendarSupport/CollectionSelection>
diff --git a/eventviews/src/timeline/timelineview_p.cpp b/eventviews/src/timeline/timelineview_p.cpp
index 7b4d6c0..fa299fd 100644
--- a/eventviews/src/timeline/timelineview_p.cpp
+++ b/eventviews/src/timeline/timelineview_p.cpp
@@ -25,7 +25,7 @@
#include "timelineview_p.h"
#include "timelineitem.h"
-#include <kdgantt2/kdganttgraphicsview.h>
+#include <KDGantt2/KDGanttGraphicsView>
#include <Akonadi/Calendar/ETMCalendar>
#include <CalendarSupport/CollectionSelection>
diff --git a/incidenceeditor-ng/autotests/CMakeLists.txt b/incidenceeditor-ng/autotests/CMakeLists.txt
index a34c852..cea13d9 100644
--- a/incidenceeditor-ng/autotests/CMakeLists.txt
+++ b/incidenceeditor-ng/autotests/CMakeLists.txt
@@ -9,7 +9,7 @@ MACRO(IE_UNIT_TESTS)
add_executable( ${_testname} ${_testname}.cpp modeltest.cpp )
add_test( ${_testname} ${_testname} )
ecm_mark_as_test(${_testname})
- target_link_libraries(${_testname} Qt5::Test KF5::AkonadiCore kdgantt2 KF5::CalendarUtils KF5::CalendarCore KF5::IncidenceEditorsng kdepimdbusinterfaces KF5::Libkdepim)
+ target_link_libraries(${_testname} Qt5::Test KF5::AkonadiCore KF5::KDGantt2 KF5::CalendarUtils KF5::CalendarCore KF5::IncidenceEditorsng kdepimdbusinterfaces KF5::Libkdepim)
ENDFOREACH(_testname)
ENDMACRO(IE_UNIT_TESTS)
diff --git a/incidenceeditor-ng/autotests/testfreebusyganttproxymodel.cpp b/incidenceeditor-ng/autotests/testfreebusyganttproxymodel.cpp
index e77c015..edb8554 100644
--- a/incidenceeditor-ng/autotests/testfreebusyganttproxymodel.cpp
+++ b/incidenceeditor-ng/autotests/testfreebusyganttproxymodel.cpp
@@ -24,7 +24,7 @@
#include "freebusymodel/freebusyitemmodel.h"
#include "../src/freebusyganttproxymodel.h"
-#include <kdgantt2/kdganttgraphicsview.h>
+#include <KDGantt2/KDGanttGraphicsView>
#include <KCalCore/Attendee>
diff --git a/incidenceeditor-ng/src/CMakeLists.txt b/incidenceeditor-ng/src/CMakeLists.txt
index 61edf9c..27f42af 100644
--- a/incidenceeditor-ng/src/CMakeLists.txt
+++ b/incidenceeditor-ng/src/CMakeLists.txt
@@ -103,7 +103,7 @@ PUBLIC
KF5::MailTransport
KF5::CalendarSupport # For KCalPrefs
KF5::EventViews
- kdgantt2 # For FreeBusy Editor
+ KF5::KDGantt2 # For FreeBusy Editor
PRIVATE
KF5::Libkdepim
kdepimdbusinterfaces # For UriHandler
diff --git a/incidenceeditor-ng/src/freebusyganttproxymodel.cpp b/incidenceeditor-ng/src/freebusyganttproxymodel.cpp
index 8c5cf00..b28cd3d 100644
--- a/incidenceeditor-ng/src/freebusyganttproxymodel.cpp
+++ b/incidenceeditor-ng/src/freebusyganttproxymodel.cpp
@@ -21,7 +21,7 @@
#include "freebusyganttproxymodel.h"
#include "freebusymodel/freebusyitemmodel.h"
-#include <kdgantt2/kdganttgraphicsview.h>
+#include <KDGantt2/KDGanttGraphicsView>
#include <KCalCore/FreeBusyPeriod>
diff --git a/incidenceeditor-ng/src/resourcemanagement.cpp b/incidenceeditor-ng/src/resourcemanagement.cpp
index 751e422..d6005eb 100644
--- a/incidenceeditor-ng/src/resourcemanagement.cpp
+++ b/incidenceeditor-ng/src/resourcemanagement.cpp
@@ -35,10 +35,10 @@
#include <KCalCore/Event>
#include <KCalCore/MemoryCalendar>
-#include <kdgantt2/kdganttgraphicsview.h>
-#include <kdgantt2/kdganttview.h>
-#include <kdgantt2/kdganttdatetimegrid.h>
-#include <kdgantt2/kdganttabstractrowcontroller.h>
+#include <KDGantt2/KDGanttGraphicsView>
+#include <KDGantt2/KDGanttView>
+#include <KDGantt2/KDGanttDateTimeGrid>
+#include <KDGantt2/KDGanttAbstractRowController>
#include <akonadi/calendar/freebusymanager.h>
#include <kldap/ldapobject.h>
diff --git a/incidenceeditor-ng/src/visualfreebusywidget.cpp b/incidenceeditor-ng/src/visualfreebusywidget.cpp
index d733b25..af9f4bf 100644
--- a/incidenceeditor-ng/src/visualfreebusywidget.cpp
+++ b/incidenceeditor-ng/src/visualfreebusywidget.cpp
@@ -22,10 +22,10 @@
#include "freebusyganttproxymodel.h"
#include "freebusymodel/freebusyitemmodel.h"
-#include <kdgantt2/kdganttgraphicsview.h>
-#include <kdgantt2/kdganttview.h>
-#include <kdgantt2/kdganttdatetimegrid.h>
-#include <kdgantt2/kdganttabstractrowcontroller.h>
+#include <KDGantt2/KDGanttGraphicsView>
+#include <KDGantt2/KDGanttView>
+#include <KDGantt2/KDGanttDateTimeGrid>
+#include <KDGantt2/KDGanttAbstractRowController>
#include <KComboBox>
#include "incidenceeditor_debug.h"
diff --git a/kdgantt2/CMakeLists.txt b/kdgantt2/CMakeLists.txt
index 5ddeee9..a88abd2 100644
--- a/kdgantt2/CMakeLists.txt
+++ b/kdgantt2/CMakeLists.txt
@@ -1,57 +1,81 @@
+
+cmake_minimum_required(VERSION 2.8.12)
+
project(kdgantt2)
-add_definitions(-DTRANSLATION_DOMAIN=\"kdgantt2\")
-# Those paths need to be absolute since this file is included from other CMakeLists.txt files
-set(libkdgantt2_SRCS
-kdganttabstractgrid.cpp
-kdganttabstractrowcontroller.cpp
-kdganttconstraint.cpp
-kdganttconstraintgraphicsitem.cpp
-kdganttconstraintmodel.cpp
-kdganttconstraintproxy.cpp
-kdganttdatetimegrid.cpp
-kdganttforwardingproxymodel.cpp
-kdganttglobal.cpp
-kdganttgraphicsitem.cpp
-kdganttgraphicsscene.cpp
-kdganttgraphicsview.cpp
-kdganttitemdelegate.cpp
-kdganttlegend.cpp
-kdganttlistviewrowcontroller.cpp
-kdganttproxymodel.cpp
-kdganttstyleoptionganttitem.cpp
-kdganttsummaryhandlingproxymodel.cpp
-kdgantttreeviewrowcontroller.cpp
-kdganttview.cpp
+if(${CMAKE_SOURCE_DIR} STREQUAL ${kdgantt2_SOURCE_DIR})
+# ECM setup
+find_package(ECM 5.14.0 CONFIG REQUIRED)
+set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
+
+include(GenerateExportHeader)
+include(ECMSetupVersion)
+include(ECMGenerateHeaders)
+include(ECMGeneratePriFile)
+include(ECMPackageConfigHelpers)
+include(ECMSetupVersion)
+include(FeatureSummary)
+include(KDEInstallDirs)
+include(KDECMakeSettings)
+include(KDEFrameworkCompilerSettings)
+include(ECMQtDeclareLoggingCategory)
+include(ECMAddTests)
+
+
+set(KF5_VERSION "5.14.0")
+set(KDEPIMLIBS_LIB_VERSION "5.0.42")
+set(KDEPIM_LIB_VERSION "5.43.0")
+set(QT_REQUIRED_VERSION "5.4.0")
+set(KMIME_LIB_VERSION "4.87.0")
+
+find_package(KF5Akonadi ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
+find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test UiTools)
+find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
+find_package(KF5Mime ${KMIME_LIB_VERSION} CONFIG REQUIRED)
+find_package(KF5AkonadiMime ${KDEPIMLIBS_LIB_VERSION} CONFIG REQUIRED)
+
+ecm_setup_version(${KDEPIM_LIB_VERSION} VARIABLE_PREFIX KDGANTT2
+ VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kdgantt2_version.h"
+ PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5KDGantt2ConfigVersion.cmake"
+ SOVERSION 5
+)
+
+########### Targets ###########
+
+add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
+
+########### CMake Config Files ###########
+set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5KDGantt2")
+
+ecm_configure_package_config_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/KF5KDGantt2Config.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/KF5KDGantt2Config.cmake"
+ INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
-ecm_qt_declare_logging_category(libkdgantt2_SRCS HEADER kdgantt_debug.h IDENTIFIER KDGANTT_LOG CATEGORY_NAME log_kdgantt)
-
-add_definitions(-DKDAB_NO_UNIT_TESTS -DKDGANTT_SHAREDLIB -DKDGANTT_BUILD_KDGANTT_LIB)
-
-# Generate moc_foo.cpp files since that's what the cpp files include (it works automatically with qmake, this way...)
-# List of source files generated with "grep -l moc_ *.cpp | sed -e 's/\.cpp$//'"
-# Plus kdganttgraphicsview_p
-set(libkdgantt_mocable_files
- kdganttabstractgrid
- kdganttconstraintmodel
- kdganttconstraintproxy
- kdganttdatetimegrid
- kdganttforwardingproxymodel
- kdganttgraphicsscene
- kdganttgraphicsview
- kdganttitemdelegate
- kdganttproxymodel
- kdganttsummaryhandlingproxymodel
- kdganttview
- kdganttlegend
- kdgantttimescalezoomdialog
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/KF5KDGantt2Config.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/KF5KDGantt2ConfigVersion.cmake"
+ DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
+ COMPONENT Devel
)
-add_library(kdgantt2 ${libkdgantt2_SRCS})
-generate_export_header(kdgantt2 BASE_NAME kdgantt)
-target_link_libraries(kdgantt2 PRIVATE Qt5::Widgets Qt5::PrintSupport )
-target_include_directories(kdgantt2 PUBLIC "$<BUILD_INTERFACE:${kdgantt2_SOURCE_DIR};${kdgantt2_BINARY_DIR}>")
+install(EXPORT KF5KDGantt2Targets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5KDGantt2Targets.cmake NAMESPACE KF5::)
+
+install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/kdgantt2_version.h
+ DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
+)
+
+feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
+else()
+ecm_setup_version(${KDEPIM_LIB_VERSION} VARIABLE_PREFIX KDGANTT2
+ VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kdgantt2_version.h"
+ PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5KDGantt2ConfigVersion.cmake"
+ SOVERSION 5
+)
+endif()
-set_target_properties( kdgantt2 PROPERTIES VERSION 1.0.0 SOVERSION 1)
-install(TARGETS kdgantt2 ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
+# Laurent install it if you want to debug it
+#add_subdirectory(tests)
+add_subdirectory(src)
diff --git a/kdgantt2/KF5KDGantt2Config.cmake.in b/kdgantt2/KF5KDGantt2Config.cmake.in
new file mode 100644
index 0000000..68ef64b
--- /dev/null
+++ b/kdgantt2/KF5KDGantt2Config.cmake.in
@@ -0,0 +1,3 @@
+
+include("${CMAKE_CURRENT_LIST_DIR}/KF5KDGantt2Targets.cmake")
diff --git a/kdgantt2/src/CMakeLists.txt b/kdgantt2/src/CMakeLists.txt
new file mode 100644
index 0000000..37c85b3
--- /dev/null
+++ b/kdgantt2/src/CMakeLists.txt
@@ -0,0 +1,99 @@
+add_definitions(-DTRANSLATION_DOMAIN=\"kdgantt2\")
+# Those paths need to be absolute since this file is included from other CMakeLists.txt files
+set(libkdgantt2_SRCS
+kdganttabstractgrid.cpp
+kdganttabstractrowcontroller.cpp
+kdganttconstraint.cpp
+kdganttconstraintgraphicsitem.cpp
+kdganttconstraintmodel.cpp
+kdganttconstraintproxy.cpp
+kdganttdatetimegrid.cpp
+kdganttforwardingproxymodel.cpp
+kdganttglobal.cpp
+kdganttgraphicsitem.cpp
+kdganttgraphicsscene.cpp
+kdganttgraphicsview.cpp
+kdganttitemdelegate.cpp
+kdganttlegend.cpp
+kdganttlistviewrowcontroller.cpp
+kdganttproxymodel.cpp
+kdganttstyleoptionganttitem.cpp
+kdganttsummaryhandlingproxymodel.cpp
+kdgantttreeviewrowcontroller.cpp
+kdganttview.cpp
+)
+
+ecm_qt_declare_logging_category(libkdgantt2_SRCS HEADER kdgantt_debug.h IDENTIFIER KDGANTT_LOG CATEGORY_NAME log_kdgantt)
+
+add_definitions(-DKDAB_NO_UNIT_TESTS -DKDGANTT_SHAREDLIB -DKDGANTT_BUILD_KDGANTT_LIB)
+
+# Generate moc_foo.cpp files since that's what the cpp files include (it works automatically with qmake, this way...)
+# List of source files generated with "grep -l moc_ *.cpp | sed -e 's/\.cpp$//'"
+# Plus kdganttgraphicsview_p
+set(libkdgantt_mocable_files
+ kdganttabstractgrid
+ kdganttconstraintmodel
+ kdganttconstraintproxy
+ kdganttdatetimegrid
+ kdganttforwardingproxymodel
+ kdganttgraphicsscene
+ kdganttgraphicsview
+ kdganttitemdelegate
+ kdganttproxymodel
+ kdganttsummaryhandlingproxymodel
+ kdganttview
+ kdganttlegend
+ kdgantttimescalezoomdialog
+)
+
+add_library(KF5KDGantt2 ${libkdgantt2_SRCS})
+generate_export_header(KF5KDGantt2 BASE_NAME kdgantt)
+add_library(KF5::KDGantt2 ALIAS KF5KDGantt2)
+target_link_libraries(KF5KDGantt2 PRIVATE Qt5::Widgets Qt5::PrintSupport )
+
+target_include_directories(KF5KDGantt2 INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KDGantt2/;${KDE_INSTALL_INCLUDEDIR_KF5}/kdgantt2>")
+target_include_directories(KF5KDGantt2 PUBLIC "$<BUILD_INTERFACE:${kdgantt2_SOURCE_DIR};${kdgantt2_BINARY_DIR}>")
+
+
+set_target_properties(KF5KDGantt2 PROPERTIES
+ VERSION ${KDGANTT2_VERSION_STRING}
+ SOVERSION ${KDGANTT2_SOVERSION}
+ EXPORT_NAME KDGantt2
+)
+
+install(TARGETS
+ KF5KDGantt2
+ EXPORT KF5KDGantt2Targets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}
+)
+
+ecm_generate_headers(kdgantt2_CamelCase_HEADERS
+ HEADER_NAMES
+ KDGanttItemDelegate
+ KDGanttGlobal
+ KDGanttGraphicsItem
+ KDGanttGraphicsView
+ KDGanttAbstractRowController
+ KDGanttView
+ KDGanttDateTimeGrid
+ KDGanttItemDelegate
+ KDGanttStyleOptionGanttItem
+ REQUIRED_HEADERS kdgantt2_HEADERS
+ PREFIX KDGantt2
+)
+
+
+if(${CMAKE_SOURCE_DIR} STREQUAL ${kdgantt2_SOURCE_DIR})
+install(FILES
+ ${kdgantt2_CamelCase_HEADERS}
+ DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KDGantt2
+ COMPONENT Devel
+)
+
+install(FILES
+ ${kdgantt2_HEADERS}
+ ${CMAKE_CURRENT_BINARY_DIR}/kdgantt2_export.h
+ ${kdgantt2_CamelCase_HEADERS}
+ DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/kdgantt2
+ COMPONENT Devel
+)
+endif() \ No newline at end of file
diff --git a/kdgantt2/Messages.sh b/kdgantt2/src/Messages.sh
index 2f19628..2f19628 100644
--- a/kdgantt2/Messages.sh
+++ b/kdgantt2/src/Messages.sh
diff --git a/kdgantt2/docs.h b/kdgantt2/src/docs.h
index aa605bc..aa605bc 100644
--- a/kdgantt2/docs.h
+++ b/kdgantt2/src/docs.h
diff --git a/kdgantt2/kdganttabstractgrid.cpp b/kdgantt2/src/kdganttabstractgrid.cpp
index 9bf1276..9bf1276 100644
--- a/kdgantt2/kdganttabstractgrid.cpp
+++ b/kdgantt2/src/kdganttabstractgrid.cpp
diff --git a/kdgantt2/kdganttabstractgrid.h b/kdgantt2/src/kdganttabstractgrid.h
index 8ce7314..8ce7314 100644
--- a/kdgantt2/kdganttabstractgrid.h
+++ b/kdgantt2/src/kdganttabstractgrid.h
diff --git a/kdgantt2/kdganttabstractgrid_p.h b/kdgantt2/src/kdganttabstractgrid_p.h
index da3ebf6..da3ebf6 100644
--- a/kdgantt2/kdganttabstractgrid_p.h
+++ b/kdgantt2/src/kdganttabstractgrid_p.h
diff --git a/kdgantt2/kdganttabstractrowcontroller.cpp b/kdgantt2/src/kdganttabstractrowcontroller.cpp
index 6b3aeb6..6b3aeb6 100644
--- a/kdgantt2/kdganttabstractrowcontroller.cpp
+++ b/kdgantt2/src/kdganttabstractrowcontroller.cpp
diff --git a/kdgantt2/kdganttabstractrowcontroller.h b/kdgantt2/src/kdganttabstractrowcontroller.h
index 497dc7b..497dc7b 100644
--- a/kdgantt2/kdganttabstractrowcontroller.h
+++ b/kdgantt2/src/kdganttabstractrowcontroller.h
diff --git a/kdgantt2/kdganttconstraint.cpp b/kdgantt2/src/kdganttconstraint.cpp
index cc0eb4d..cc0eb4d 100644
--- a/kdgantt2/kdganttconstraint.cpp
+++ b/kdgantt2/src/kdganttconstraint.cpp
diff --git a/kdgantt2/kdganttconstraint.h b/kdgantt2/src/kdganttconstraint.h
index c7271bd..c7271bd 100644
--- a/kdgantt2/kdganttconstraint.h
+++ b/kdgantt2/src/kdganttconstraint.h
diff --git a/kdgantt2/kdganttconstraint_p.h b/kdgantt2/src/kdganttconstraint_p.h
index 787eb5a..787eb5a 100644
--- a/kdgantt2/kdganttconstraint_p.h
+++ b/kdgantt2/src/kdganttconstraint_p.h
diff --git a/kdgantt2/kdganttconstraintgraphicsitem.cpp b/kdgantt2/src/kdganttconstraintgraphicsitem.cpp
index df4bde9..df4bde9 100644
--- a/kdgantt2/kdganttconstraintgraphicsitem.cpp
+++ b/kdgantt2/src/kdganttconstraintgraphicsitem.cpp
diff --git a/kdgantt2/kdganttconstraintgraphicsitem.h b/kdgantt2/src/kdganttconstraintgraphicsitem.h
index 470a4f8..470a4f8 100644
--- a/kdgantt2/kdganttconstraintgraphicsitem.h
+++ b/kdgantt2/src/kdganttconstraintgraphicsitem.h
diff --git a/kdgantt2/kdganttconstraintmodel.cpp b/kdgantt2/src/kdganttconstraintmodel.cpp
index 0b6e9ed..0b6e9ed 100644
--- a/kdgantt2/kdganttconstraintmodel.cpp
+++ b/kdgantt2/src/kdganttconstraintmodel.cpp
diff --git a/kdgantt2/kdganttconstraintmodel.h b/kdgantt2/src/kdganttconstraintmodel.h
index ce30e9d..ce30e9d 100644
--- a/kdgantt2/kdganttconstraintmodel.h
+++ b/kdgantt2/src/kdganttconstraintmodel.h
diff --git a/kdgantt2/kdganttconstraintmodel_p.h b/kdgantt2/src/kdganttconstraintmodel_p.h
index b967c8f..b967c8f 100644
--- a/kdgantt2/kdganttconstraintmodel_p.h
+++ b/kdgantt2/src/kdganttconstraintmodel_p.h
diff --git a/kdgantt2/kdganttconstraintproxy.cpp b/kdgantt2/src/kdganttconstraintproxy.cpp
index 4f8b395..4f8b395 100644
--- a/kdgantt2/kdganttconstraintproxy.cpp
+++ b/kdgantt2/src/kdganttconstraintproxy.cpp
diff --git a/kdgantt2/kdganttconstraintproxy.h b/kdgantt2/src/kdganttconstraintproxy.h
index e3ababc..e3ababc 100644
--- a/kdgantt2/kdganttconstraintproxy.h
+++ b/kdgantt2/src/kdganttconstraintproxy.h
diff --git a/kdgantt2/kdganttdatetimegrid.cpp b/kdgantt2/src/kdganttdatetimegrid.cpp
index e4b3882..e4b3882 100644
--- a/kdgantt2/kdganttdatetimegrid.cpp
+++ b/kdgantt2/src/kdganttdatetimegrid.cpp
diff --git a/kdgantt2/kdganttdatetimegrid.h b/kdgantt2/src/kdganttdatetimegrid.h
index f496635..f496635 100644
--- a/kdgantt2/kdganttdatetimegrid.h
+++ b/kdgantt2/src/kdganttdatetimegrid.h
diff --git a/kdgantt2/kdganttdatetimegrid_p.h b/kdgantt2/src/kdganttdatetimegrid_p.h
index a6c59e9..a6c59e9 100644
--- a/kdgantt2/kdganttdatetimegrid_p.h
+++ b/kdgantt2/src/kdganttdatetimegrid_p.h
diff --git a/kdgantt2/kdganttforwardingproxymodel.cpp b/kdgantt2/src/kdganttforwardingproxymodel.cpp
index bb3676e..bb3676e 100644
--- a/kdgantt2/kdganttforwardingproxymodel.cpp
+++ b/kdgantt2/src/kdganttforwardingproxymodel.cpp
diff --git a/kdgantt2/kdganttforwardingproxymodel.h b/kdgantt2/src/kdganttforwardingproxymodel.h
index 1c5fb68..1c5fb68 100644
--- a/kdgantt2/kdganttforwardingproxymodel.h
+++ b/kdgantt2/src/kdganttforwardingproxymodel.h
diff --git a/kdgantt2/kdganttglobal.cpp b/kdgantt2/src/kdganttglobal.cpp
index 43ae900..43ae900 100644
--- a/kdgantt2/kdganttglobal.cpp
+++ b/kdgantt2/src/kdganttglobal.cpp
diff --git a/kdgantt2/kdganttglobal.h b/kdgantt2/src/kdganttglobal.h
index 986d45b..986d45b 100644
--- a/kdgantt2/kdganttglobal.h
+++ b/kdgantt2/src/kdganttglobal.h
diff --git a/kdgantt2/kdganttgraphicsitem.cpp b/kdgantt2/src/kdganttgraphicsitem.cpp
index 69dd1e0..69dd1e0 100644
--- a/kdgantt2/kdganttgraphicsitem.cpp
+++ b/kdgantt2/src/kdganttgraphicsitem.cpp
diff --git a/kdgantt2/kdganttgraphicsitem.h b/kdgantt2/src/kdganttgraphicsitem.h
index c62b2f3..c62b2f3 100644
--- a/kdgantt2/kdganttgraphicsitem.h
+++ b/kdgantt2/src/kdganttgraphicsitem.h
diff --git a/kdgantt2/kdganttgraphicsscene.cpp b/kdgantt2/src/kdganttgraphicsscene.cpp
index 3bb84e0..3bb84e0 100644
--- a/kdgantt2/kdganttgraphicsscene.cpp
+++ b/kdgantt2/src/kdganttgraphicsscene.cpp
diff --git a/kdgantt2/kdganttgraphicsscene.h b/kdgantt2/src/kdganttgraphicsscene.h
index e144a4b..e144a4b 100644
--- a/kdgantt2/kdganttgraphicsscene.h
+++ b/kdgantt2/src/kdganttgraphicsscene.h
diff --git a/kdgantt2/kdganttgraphicsscene_p.h b/kdgantt2/src/kdganttgraphicsscene_p.h
index d178c4d..d178c4d 100644
--- a/kdgantt2/kdganttgraphicsscene_p.h
+++ b/kdgantt2/src/kdganttgraphicsscene_p.h
diff --git a/kdgantt2/kdganttgraphicsview.cpp b/kdgantt2/src/kdganttgraphicsview.cpp
index 7f180d2..7f180d2 100644
--- a/kdgantt2/kdganttgraphicsview.cpp
+++ b/kdgantt2/src/kdganttgraphicsview.cpp
diff --git a/kdgantt2/kdganttgraphicsview.h b/kdgantt2/src/kdganttgraphicsview.h
index 6066bd4..6066bd4 100644
--- a/kdgantt2/kdganttgraphicsview.h
+++ b/kdgantt2/src/kdganttgraphicsview.h
diff --git a/kdgantt2/kdganttgraphicsview_p.h b/kdgantt2/src/kdganttgraphicsview_p.h
index a9be8a6..a9be8a6 100644
--- a/kdgantt2/kdganttgraphicsview_p.h
+++ b/kdgantt2/src/kdganttgraphicsview_p.h
diff --git a/kdgantt2/kdganttitemdelegate.cpp b/kdgantt2/src/kdganttitemdelegate.cpp
index a89b4c0..a89b4c0 100644
--- a/kdgantt2/kdganttitemdelegate.cpp
+++ b/kdgantt2/src/kdganttitemdelegate.cpp
diff --git a/kdgantt2/kdganttitemdelegate.h b/kdgantt2/src/kdganttitemdelegate.h
index 38a0df2..38a0df2 100644
--- a/kdgantt2/kdganttitemdelegate.h
+++ b/kdgantt2/src/kdganttitemdelegate.h
diff --git a/kdgantt2/kdganttitemdelegate_p.h b/kdgantt2/src/kdganttitemdelegate_p.h
index 6edba24..6edba24 100644
--- a/kdgantt2/kdganttitemdelegate_p.h
+++ b/kdgantt2/src/kdganttitemdelegate_p.h
diff --git a/kdgantt2/kdganttlegend.cpp b/kdgantt2/src/kdganttlegend.cpp
index 624611a..624611a 100644
--- a/kdgantt2/kdganttlegend.cpp
+++ b/kdgantt2/src/kdganttlegend.cpp
diff --git a/kdgantt2/kdganttlegend.h b/kdgantt2/src/kdganttlegend.h
index a5eca02..a5eca02 100644
--- a/kdgantt2/kdganttlegend.h
+++ b/kdgantt2/src/kdganttlegend.h
diff --git a/kdgantt2/kdganttlegend_p.h b/kdgantt2/src/kdganttlegend_p.h
index 489f2de..489f2de 100644
--- a/kdgantt2/kdganttlegend_p.h
+++ b/kdgantt2/src/kdganttlegend_p.h
diff --git a/kdgantt2/kdganttlistviewrowcontroller.cpp b/kdgantt2/src/kdganttlistviewrowcontroller.cpp
index bf44625..bf44625 100644
--- a/kdgantt2/kdganttlistviewrowcontroller.cpp
+++ b/kdgantt2/src/kdganttlistviewrowcontroller.cpp
diff --git a/kdgantt2/kdganttlistviewrowcontroller.h b/kdgantt2/src/kdganttlistviewrowcontroller.h
index cbc5753..cbc5753 100644
--- a/kdgantt2/kdganttlistviewrowcontroller.h
+++ b/kdgantt2/src/kdganttlistviewrowcontroller.h
diff --git a/kdgantt2/kdganttlistviewrowcontroller_p.h b/kdgantt2/src/kdganttlistviewrowcontroller_p.h
index 5ebf33a..5ebf33a 100644
--- a/kdgantt2/kdganttlistviewrowcontroller_p.h
+++ b/kdgantt2/src/kdganttlistviewrowcontroller_p.h
diff --git a/kdgantt2/kdganttproxymodel.cpp b/kdgantt2/src/kdganttproxymodel.cpp
index 5bcede9..5bcede9 100644
--- a/kdgantt2/kdganttproxymodel.cpp
+++ b/kdgantt2/src/kdganttproxymodel.cpp
diff --git a/kdgantt2/kdganttproxymodel.h b/kdgantt2/src/kdganttproxymodel.h
index 2c10395..2c10395 100644
--- a/kdgantt2/kdganttproxymodel.h
+++ b/kdgantt2/src/kdganttproxymodel.h
diff --git a/kdgantt2/kdganttproxymodel_p.h b/kdgantt2/src/kdganttproxymodel_p.h
index 9ddfdfd..9ddfdfd 100644
--- a/kdgantt2/kdganttproxymodel_p.h
+++ b/kdgantt2/src/kdganttproxymodel_p.h
diff --git a/kdgantt2/kdganttstyleoptionganttitem.cpp b/kdgantt2/src/kdganttstyleoptionganttitem.cpp
index dacbc3d..dacbc3d 100644
--- a/kdgantt2/kdganttstyleoptionganttitem.cpp
+++ b/kdgantt2/src/kdganttstyleoptionganttitem.cpp
diff --git a/kdgantt2/kdganttstyleoptionganttitem.h b/kdgantt2/src/kdganttstyleoptionganttitem.h
index 7324c13..7324c13 100644
--- a/kdgantt2/kdganttstyleoptionganttitem.h
+++ b/kdgantt2/src/kdganttstyleoptionganttitem.h
diff --git a/kdgantt2/kdganttsummaryhandlingproxymodel.cpp b/kdgantt2/src/kdganttsummaryhandlingproxymodel.cpp
index 4bdd507..4bdd507 100644
--- a/kdgantt2/kdganttsummaryhandlingproxymodel.cpp
+++ b/kdgantt2/src/kdganttsummaryhandlingproxymodel.cpp
diff --git a/kdgantt2/kdganttsummaryhandlingproxymodel.h b/kdgantt2/src/kdganttsummaryhandlingproxymodel.h
index 48a6433..48a6433 100644
--- a/kdgantt2/kdganttsummaryhandlingproxymodel.h
+++ b/kdgantt2/src/kdganttsummaryhandlingproxymodel.h
diff --git a/kdgantt2/kdganttsummaryhandlingproxymodel_p.h b/kdgantt2/src/kdganttsummaryhandlingproxymodel_p.h
index 4d20110..4d20110 100644
--- a/kdgantt2/kdganttsummaryhandlingproxymodel_p.h
+++ b/kdgantt2/src/kdganttsummaryhandlingproxymodel_p.h
diff --git a/kdgantt2/kdgantttreeviewrowcontroller.cpp b/kdgantt2/src/kdgantttreeviewrowcontroller.cpp
index c62b713..c62b713 100644
--- a/kdgantt2/kdgantttreeviewrowcontroller.cpp
+++ b/kdgantt2/src/kdgantttreeviewrowcontroller.cpp
diff --git a/kdgantt2/kdgantttreeviewrowcontroller.h b/kdgantt2/src/kdgantttreeviewrowcontroller.h
index 81a9f0c..81a9f0c 100644
--- a/kdgantt2/kdgantttreeviewrowcontroller.h
+++ b/kdgantt2/src/kdgantttreeviewrowcontroller.h
diff --git a/kdgantt2/kdgantttreeviewrowcontroller_p.h b/kdgantt2/src/kdgantttreeviewrowcontroller_p.h
index 315814e..315814e 100644
--- a/kdgantt2/kdgantttreeviewrowcontroller_p.h
+++ b/kdgantt2/src/kdgantttreeviewrowcontroller_p.h
diff --git a/kdgantt2/kdganttview.cpp b/kdgantt2/src/kdganttview.cpp
index ddbfd17..ddbfd17 100644
--- a/kdgantt2/kdganttview.cpp
+++ b/kdgantt2/src/kdganttview.cpp
diff --git a/kdgantt2/kdganttview.h b/kdgantt2/src/kdganttview.h
index 3f61da6..3f61da6 100644
--- a/kdgantt2/kdganttview.h
+++ b/kdgantt2/src/kdganttview.h
diff --git a/kdgantt2/kdganttview_p.h b/kdgantt2/src/kdganttview_p.h
index 885df05..885df05 100644
--- a/kdgantt2/kdganttview_p.h
+++ b/kdgantt2/src/kdganttview_p.h