aboutsummaryrefslogtreecommitdiffstats
path: root/community/nemo-qml-plugin-calendar/0001-Port-to-CMake.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/nemo-qml-plugin-calendar/0001-Port-to-CMake.patch')
-rw-r--r--community/nemo-qml-plugin-calendar/0001-Port-to-CMake.patch625
1 files changed, 625 insertions, 0 deletions
diff --git a/community/nemo-qml-plugin-calendar/0001-Port-to-CMake.patch b/community/nemo-qml-plugin-calendar/0001-Port-to-CMake.patch
new file mode 100644
index 0000000000..2531fffe9a
--- /dev/null
+++ b/community/nemo-qml-plugin-calendar/0001-Port-to-CMake.patch
@@ -0,0 +1,625 @@
+From 676285b18b11055eca4481434934c5d5d816ac4f Mon Sep 17 00:00:00 2001
+From: Bart Ribbers <bribbers@disroot.org>
+Date: Sun, 18 Apr 2021 17:22:02 +0200
+Subject: [PATCH] Port to CMake
+
+This project uses KDE's KCalendarCore. However, that package can only be
+used with build systems that support CMake dependencies, which QMake is
+not one of. KCalendarCore probably shipped a pkgconfig file in the past,
+but this has not been the case for a quite a while as far as I can see.
+
+Since using QMake thus prevents using a current KCalendarCore, switch
+the build system to CMake instead
+---
+ .gitignore | 5 +-
+ CMakeLists.txt | 51 ++++++++++++++
+ calendar.pro | 7 --
+ lightweight/CMakeLists.txt | 2 +
+ .../calendardataservice/CMakeLists.txt | 23 ++++++
+ .../calendardataservice.pro | 45 ------------
+ .../calendareventsmodel/CMakeLists.txt | 23 ++++++
+ .../calendareventsmodel.pro | 34 ---------
+ lightweight/lightweight.pro | 2 -
+ src/CMakeLists.txt | 62 ++++++++++++++++
+ src/src.pro | 70 -------------------
+ tests/CMakeLists.txt | 4 ++
+ tests/common.pri | 9 ---
+ tests/tests.pro | 10 ---
+ tests/tests.xml | 10 ---
+ tests/tst_calendarevent/CMakeLists.txt | 15 ++++
+ tests/tst_calendarevent/tst_calendarevent.pro | 4 --
+ tests/tst_calendarmanager/CMakeLists.txt | 15 ++++
+ .../tst_calendarmanager.pro | 4 --
+ tools/CMakeLists.txt | 1 +
+ tools/icalconverter/CMakeLists.txt | 10 +++
+ tools/icalconverter/icalconverter.pro | 10 ---
+ tools/tools.pro | 2 -
+ 23 files changed, 207 insertions(+), 211 deletions(-)
+ create mode 100644 CMakeLists.txt
+ delete mode 100644 calendar.pro
+ create mode 100644 lightweight/CMakeLists.txt
+ create mode 100644 lightweight/calendardataservice/CMakeLists.txt
+ delete mode 100644 lightweight/calendardataservice/calendardataservice.pro
+ create mode 100644 lightweight/calendareventsmodel/CMakeLists.txt
+ delete mode 100644 lightweight/calendareventsmodel/calendareventsmodel.pro
+ delete mode 100644 lightweight/lightweight.pro
+ create mode 100644 src/CMakeLists.txt
+ delete mode 100644 src/src.pro
+ create mode 100644 tests/CMakeLists.txt
+ delete mode 100644 tests/common.pri
+ delete mode 100644 tests/tests.pro
+ delete mode 100644 tests/tests.xml
+ create mode 100644 tests/tst_calendarevent/CMakeLists.txt
+ delete mode 100644 tests/tst_calendarevent/tst_calendarevent.pro
+ create mode 100644 tests/tst_calendarmanager/CMakeLists.txt
+ delete mode 100644 tests/tst_calendarmanager/tst_calendarmanager.pro
+ create mode 100644 tools/CMakeLists.txt
+ create mode 100644 tools/icalconverter/CMakeLists.txt
+ delete mode 100644 tools/icalconverter/icalconverter.pro
+ delete mode 100644 tools/tools.pro
+
+diff --git a/.gitignore b/.gitignore
+index c6d36a2..d2a8406 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -1,11 +1,8 @@
+ # Build artefacts
+ *.o
+ *.so
+-lightweight/calendardataservice/calendardataservice
+-tests/tst_calendarevent/tst_calendarevent
+-tests/tst_calendarmanager/tst_calendarmanager
+-tools/icalconverter/icalconverter
+ RPMS
++build
+
+ # Generated sources
+ Makefile
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+new file mode 100644
+index 0000000..8bb535c
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,51 @@
++cmake_minimum_required(VERSION 3.6.0)
++
++project(nemo-qml-plugin-calendar)
++
++set(CMAKE_AUTOMOC ON)
++set(CMAKE_AUTORCC ON)
++set(CMAKE_AUTOUIC ON)
++
++set(CMAKE_INCLUDE_CURRENT_DIR ON)
++
++include(FindPkgConfig)
++include(FeatureSummary)
++include(GNUInstallDirs)
++include(CTest)
++
++set(INSTALL_QML_IMPORT_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/qt/qml"
++ CACHE PATH "Custom QML import installation directory")
++
++find_package(PkgConfig REQUIRED)
++find_package(ECM REQUIRED NO_MODULE)
++set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
++
++set(QT_MIN_VERSION "5.6.0")
++find_package(Qt5 ${QT_MIN_VERSION} COMPONENTS DBus Gui Qml Concurrent Test REQUIRED)
++find_package(KF5 COMPONENTS CalendarCore REQUIRED)
++
++pkg_check_modules(MKCAL libmkcal-qt5 IMPORTED_TARGET REQUIRED)
++set_property(GLOBAL APPEND PROPERTY _CMAKE_libmkcal-qt5_TYPE REQUIRED)
++pkg_check_modules(ACCOUNTS accounts-qt5 IMPORTED_TARGET REQUIRED)
++set_property(GLOBAL APPEND PROPERTY _CMAKE_accounts-qt5_TYPE REQUIRED)
++
++if(MKCAL_FOUND)
++ set_property(GLOBAL APPEND PROPERTY PACKAGES_FOUND libmkcal-qt5)
++else()
++ set_property(GLOBAL APPEND PROPERTY PACKAGES_NOT_FOUND libmkcal-qt5)
++endif()
++if(ACCOUNTS_FOUND)
++ set_property(GLOBAL APPEND PROPERTY PACKAGES_FOUND accounts-qt5)
++else()
++ set_property(GLOBAL APPEND PROPERTY PACKAGES_NOT_FOUND accounts-qt5)
++endif()
++
++add_subdirectory(src)
++add_subdirectory(lightweight)
++add_subdirectory(tools)
++
++if(BUILD_TESTING)
++ add_subdirectory(tests)
++endif()
++
++feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
+diff --git a/calendar.pro b/calendar.pro
+deleted file mode 100644
+index 588555a..0000000
+--- a/calendar.pro
++++ /dev/null
+@@ -1,7 +0,0 @@
+-TEMPLATE = subdirs
+-SUBDIRS = src tests lightweight tools
+-
+-tests.depends = src
+-tools.depends = src
+-
+-OTHER_FILES += rpm/*
+diff --git a/lightweight/CMakeLists.txt b/lightweight/CMakeLists.txt
+new file mode 100644
+index 0000000..4fff204
+--- /dev/null
++++ b/lightweight/CMakeLists.txt
+@@ -0,0 +1,2 @@
++add_subdirectory(calendardataservice)
++add_subdirectory(calendareventsmodel)
+diff --git a/lightweight/calendardataservice/CMakeLists.txt b/lightweight/calendardataservice/CMakeLists.txt
+new file mode 100644
+index 0000000..36425cf
+--- /dev/null
++++ b/lightweight/calendardataservice/CMakeLists.txt
+@@ -0,0 +1,23 @@
++set(SRC
++ main.cpp
++ calendardataservice.cpp
++ calendardataserviceadaptor.cpp
++ ../common/eventdata.cpp)
++set(HEADERS
++ calendardataservice.h
++ calendardataserviceadaptor.h
++ ../common/eventdata.h)
++
++add_executable(calendardataservice ${SRC} ${HEADERS})
++target_link_libraries(calendardataservice
++ Qt5::Qml
++ Qt5::DBus
++ KF5::CalendarCore
++ mkcal-qt5
++ accounts-qt5
++ nemocalendar)
++
++install(TARGETS calendardataservice
++ DESTINATION ${CMAKE_INSTALL_BINDIR})
++install(FILES org.nemomobile.calendardataservice.service
++ DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/services)
+diff --git a/lightweight/calendardataservice/calendardataservice.pro b/lightweight/calendardataservice/calendardataservice.pro
+deleted file mode 100644
+index cfe937d..0000000
+--- a/lightweight/calendardataservice/calendardataservice.pro
++++ /dev/null
+@@ -1,45 +0,0 @@
+-TEMPLATE = app
+-TARGET = calendardataservice
+-target.path = /usr/bin
+-
+-QT += qml dbus
+-QT -= gui
+-
+-CONFIG += link_pkgconfig
+-PKGCONFIG += KF5CalendarCore libmkcal-qt5 accounts-qt5
+-
+-HEADERS += \
+- calendardataservice.h \
+- calendardataserviceadaptor.h \
+- ../common/eventdata.h \
+- ../../src/calendaragendamodel.h \
+- ../../src/calendarmanager.h \
+- ../../src/calendarworker.h \
+- ../../src/calendareventoccurrence.h \
+- ../../src/calendarevent.h \
+- ../../src/calendarchangeinformation.h \
+- ../../src/calendareventquery.h \
+- ../../src/calendarinvitationquery.h \
+- ../../src/calendarutils.h
+-
+-SOURCES += \
+- calendardataservice.cpp \
+- calendardataserviceadaptor.cpp \
+- ../common/eventdata.cpp \
+- ../../src/calendaragendamodel.cpp \
+- ../../src/calendarmanager.cpp \
+- ../../src/calendarworker.cpp \
+- ../../src/calendareventoccurrence.cpp \
+- ../../src/calendarevent.cpp \
+- ../../src/calendarchangeinformation.cpp \
+- ../../src/calendareventquery.cpp \
+- ../../src/calendarinvitationquery.cpp \
+- ../../src/calendarutils.cpp \
+- main.cpp
+-
+-dbus_service.path = /usr/share/dbus-1/services/
+-dbus_service.files = org.nemomobile.calendardataservice.service
+-
+-INSTALLS += target dbus_service
+-
+-OTHER_FILES += *.service *.xml
+diff --git a/lightweight/calendareventsmodel/CMakeLists.txt b/lightweight/calendareventsmodel/CMakeLists.txt
+new file mode 100644
+index 0000000..c29c1dd
+--- /dev/null
++++ b/lightweight/calendareventsmodel/CMakeLists.txt
+@@ -0,0 +1,23 @@
++set(PLUGIN_IMPORT_PATH ${INSTALL_QML_IMPORT_DIR}/org/nemomobile/calendar/lightweight)
++
++set(SRC
++ calendardataserviceproxy.cpp
++ calendareventsmodel.cpp
++ plugin.cpp
++ ../common/eventdata.cpp)
++set(HEADERS
++ calendardataserviceproxy.h
++ calendareventsmodel.h
++ ../common/eventdata.h)
++
++add_library(calendareventsmodel SHARED ${SRC} ${HEADERS})
++
++target_link_libraries(calendareventsmodel
++ Qt5::Gui
++ Qt5::Qml
++ Qt5::DBus)
++
++install(TARGETS calendareventsmodel
++ DESTINATION ${PLUGIN_IMPORT_PATH})
++install(FILES qmldir plugins.qmltypes
++ DESTINATION ${PLUGIN_IMPORT_PATH})
+diff --git a/lightweight/calendareventsmodel/calendareventsmodel.pro b/lightweight/calendareventsmodel/calendareventsmodel.pro
+deleted file mode 100644
+index 1016304..0000000
+--- a/lightweight/calendareventsmodel/calendareventsmodel.pro
++++ /dev/null
+@@ -1,34 +0,0 @@
+-TARGET = nemocalendarwidget
+-PLUGIN_IMPORT_PATH = org/nemomobile/calendar/lightweight
+-
+-TEMPLATE = lib
+-CONFIG += qt plugin hide_symbols
+-
+-QT += qml dbus
+-
+-target.path = $$[QT_INSTALL_QML]/$$PLUGIN_IMPORT_PATH
+-INSTALLS += target
+-
+-qmldir.files += qmldir plugins.qmltypes
+-qmldir.path += $$target.path
+-INSTALLS += qmldir
+-
+-qmltypes.commands = qmlplugindump -nonrelocatable org.nemomobile.calendar.lightweight 1.0 > $$PWD/plugins.qmltypes
+-QMAKE_EXTRA_TARGETS += qmltypes
+-
+-isEmpty(SRCDIR) SRCDIR = "."
+-SOURCES += \
+- calendardataserviceproxy.cpp \
+- calendareventsmodel.cpp \
+- ../common/eventdata.cpp \
+- plugin.cpp
+-
+-HEADERS += \
+- calendardataserviceproxy.h \
+- calendareventsmodel.h \
+- ../common/eventdata.h
+-
+-OTHER_FILES += qmldir
+-
+-MOC_DIR = $$PWD/.moc
+-OBJECTS_DIR = $$PWD/.obj
+diff --git a/lightweight/lightweight.pro b/lightweight/lightweight.pro
+deleted file mode 100644
+index 6fe91a6..0000000
+--- a/lightweight/lightweight.pro
++++ /dev/null
+@@ -1,2 +0,0 @@
+-TEMPLATE = subdirs
+-SUBDIRS = calendardataservice calendareventsmodel
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+new file mode 100644
+index 0000000..66fef87
+--- /dev/null
++++ b/src/CMakeLists.txt
+@@ -0,0 +1,62 @@
++set(PLUGIN_IMPORT_PATH ${INSTALL_QML_IMPORT_DIR}/org/nemomobile/calendar)
++set(CMAKE_INSTALL_RPATH "${PLUGIN_IMPORT_PATH}")
++
++set(SRC
++ plugin.cpp
++ calendarevent.cpp
++ calendareventoccurrence.cpp
++ calendaragendamodel.cpp
++ calendarapi.cpp
++ calendareventquery.cpp
++ calendarinvitationquery.cpp
++ calendarnotebookmodel.cpp
++ calendarmanager.cpp
++ calendarworker.cpp
++ calendarnotebookquery.cpp
++ calendareventmodification.cpp
++ calendarchangeinformation.cpp
++ calendarutils.cpp
++ calendarimportmodel.cpp
++ calendarimportevent.cpp
++ calendarcontactmodel.cpp
++ calendarattendeemodel.cpp)
++set(HEADERS
++ calendarevent.h
++ calendareventoccurrence.h
++ calendaragendamodel.h
++ calendarapi.h
++ calendareventquery.h
++ calendarinvitationquery.h
++ calendarnotebookmodel.h
++ calendarmanager.h
++ calendarworker.h
++ calendardata.h
++ calendarnotebookquery.h
++ calendareventmodification.h
++ calendarchangeinformation.h
++ calendarutils.h
++ calendarimportmodel.h
++ calendarimportevent.h
++ calendarcontactmodel.h
++ calendarattendeemodel.h)
++
++add_library(nemocalendar SHARED ${SRC} ${HEADERS})
++
++set(TARGET_MOC_DIR ${CMAKE_CURRENT_BINARY_DIR}/calendar_autogen)
++set_target_properties(nemocalendar PROPERTIES AUTOGEN_BUILD_DIR ${TARGET_MOC_DIR})
++
++# For use in other parts of the build
++set(TARGET_MOC_DIR ${TARGET_MOC_DIR}/include PARENT_SCOPE)
++
++target_link_libraries(nemocalendar
++ Qt5::Qml
++ Qt5::Concurrent
++ KF5::CalendarCore
++ PkgConfig::MKCAL
++ PkgConfig::ACCOUNTS)
++
++# Install the library
++install(TARGETS nemocalendar
++ LIBRARY DESTINATION ${PLUGIN_IMPORT_PATH})
++install(FILES qmldir plugins.qmltypes
++ DESTINATION ${PLUGIN_IMPORT_PATH})
+diff --git a/src/src.pro b/src/src.pro
+deleted file mode 100644
+index f728109..0000000
+--- a/src/src.pro
++++ /dev/null
+@@ -1,70 +0,0 @@
+-TARGET = nemocalendar
+-PLUGIN_IMPORT_PATH = org/nemomobile/calendar
+-
+-TEMPLATE = lib
+-CONFIG += qt plugin hide_symbols
+-
+-QT += qml concurrent
+-QT -= gui
+-QMAKE_CXXFLAGS += -Werror
+-
+-target.path = $$[QT_INSTALL_QML]/$$PLUGIN_IMPORT_PATH
+-PKGCONFIG += KF5CalendarCore libmkcal-qt5 accounts-qt5
+-
+-INSTALLS += target
+-
+-qmldir.files += qmldir plugins.qmltypes
+-qmldir.path += $$target.path
+-INSTALLS += qmldir
+-
+-qmltypes.commands = qmlplugindump -nonrelocatable org.nemomobile.calendar 1.0 > $$PWD/plugins.qmltypes
+-QMAKE_EXTRA_TARGETS += qmltypes
+-
+-CONFIG += link_pkgconfig
+-
+-isEmpty(SRCDIR) SRCDIR = "."
+-
+-SOURCES += \
+- $$SRCDIR/plugin.cpp \
+- $$SRCDIR/calendarevent.cpp \
+- $$SRCDIR/calendareventoccurrence.cpp \
+- $$SRCDIR/calendaragendamodel.cpp \
+- $$SRCDIR/calendarapi.cpp \
+- $$SRCDIR/calendareventquery.cpp \
+- $$SRCDIR/calendarinvitationquery.cpp \
+- $$SRCDIR/calendarnotebookmodel.cpp \
+- $$SRCDIR/calendarmanager.cpp \
+- $$SRCDIR/calendarworker.cpp \
+- $$SRCDIR/calendarnotebookquery.cpp \
+- $$SRCDIR/calendareventmodification.cpp \
+- $$SRCDIR/calendarchangeinformation.cpp \
+- $$SRCDIR/calendarutils.cpp \
+- $$SRCDIR/calendarimportmodel.cpp \
+- $$SRCDIR/calendarimportevent.cpp \
+- $$SRCDIR/calendarcontactmodel.cpp \
+- $$SRCDIR/calendarattendeemodel.cpp
+-
+-HEADERS += \
+- $$SRCDIR/calendarevent.h \
+- $$SRCDIR/calendareventoccurrence.h \
+- $$SRCDIR/calendaragendamodel.h \
+- $$SRCDIR/calendarapi.h \
+- $$SRCDIR/calendareventquery.h \
+- $$SRCDIR/calendarinvitationquery.h \
+- $$SRCDIR/calendarnotebookmodel.h \
+- $$SRCDIR/calendarmanager.h \
+- $$SRCDIR/calendarworker.h \
+- $$SRCDIR/calendardata.h \
+- $$SRCDIR/calendarnotebookquery.h \
+- $$SRCDIR/calendareventmodification.h \
+- $$SRCDIR/calendarchangeinformation.h \
+- $$SRCDIR/calendarutils.h \
+- $$SRCDIR/calendarimportmodel.h \
+- $$SRCDIR/calendarimportevent.h \
+- $$SRCDIR/calendarcontactmodel.h \
+- $$SRCDIR/calendarattendeemodel.h
+-
+-OTHER_FILES += qmldir
+-
+-MOC_DIR = $$PWD/.moc
+-OBJECTS_DIR = $$PWD/.obj
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+new file mode 100644
+index 0000000..238e21f
+--- /dev/null
++++ b/tests/CMakeLists.txt
+@@ -0,0 +1,4 @@
++enable_testing()
++
++add_subdirectory(tst_calendarevent)
++add_subdirectory(tst_calendarmanager)
+diff --git a/tests/common.pri b/tests/common.pri
+deleted file mode 100644
+index bab74e7..0000000
+--- a/tests/common.pri
++++ /dev/null
+@@ -1,9 +0,0 @@
+-SRCDIR = ../../src/
+-include(../src/src.pro)
+-INCLUDEPATH += $$SRCDIR
+-DEPENDPATH = $$INCLUDEPATH
+-QT += testlib
+-TEMPLATE = app
+-CONFIG -= app_bundle
+-
+-target.path = /opt/tests/nemo-qml-plugins-qt5/calendar
+diff --git a/tests/tests.pro b/tests/tests.pro
+deleted file mode 100644
+index 248d80a..0000000
+--- a/tests/tests.pro
++++ /dev/null
+@@ -1,10 +0,0 @@
+-TEMPLATE = subdirs
+-SUBDIRS = \
+- tst_calendarmanager \
+- tst_calendarevent
+-
+-tests_xml.path = /opt/tests/nemo-qml-plugins-qt5/calendar
+-tests_xml.files = tests.xml
+-INSTALLS += tests_xml
+-
+-OTHER_FILES += tests.xml
+diff --git a/tests/tests.xml b/tests/tests.xml
+deleted file mode 100644
+index 3025a24..0000000
+--- a/tests/tests.xml
++++ /dev/null
+@@ -1,10 +0,0 @@
+-<?xml version="1.0" encoding="UTF-8"?>
+-<testdefinition version="1.0">
+- <suite name="nemo-qml-plugins-calendar-qt5-tests" domain="mw">
+- <set name="unit-tests" feature="calendar mw">
+- <case manual="false" name="calendarmanager">
+- <step>/opt/tests/nemo-qml-plugins-qt5/calendar/tst_calendarmanager</step>
+- </case>
+- </set>
+- </suite>
+-</testdefinition>
+diff --git a/tests/tst_calendarevent/CMakeLists.txt b/tests/tst_calendarevent/CMakeLists.txt
+new file mode 100644
+index 0000000..70c0ef6
+--- /dev/null
++++ b/tests/tst_calendarevent/CMakeLists.txt
+@@ -0,0 +1,15 @@
++set(SRC tst_calendarevent.cpp)
++
++add_executable(tst_calendarevent ${SRC})
++
++target_include_directories(tst_calendarevent PRIVATE
++ ${PROJECT_SOURCE_DIR}/src
++ ${TARGET_MOC_DIR})
++
++target_link_libraries(tst_calendarevent
++ Qt5::Qml
++ Qt5::Test
++ KF5::CalendarCore
++ nemocalendar)
++
++add_test(tst_calendarevent tst_calendarevent)
+diff --git a/tests/tst_calendarevent/tst_calendarevent.pro b/tests/tst_calendarevent/tst_calendarevent.pro
+deleted file mode 100644
+index c9b0931..0000000
+--- a/tests/tst_calendarevent/tst_calendarevent.pro
++++ /dev/null
+@@ -1,4 +0,0 @@
+-include(../common.pri)
+-
+-TARGET = tst_calendarevent
+-SOURCES += tst_calendarevent.cpp
+diff --git a/tests/tst_calendarmanager/CMakeLists.txt b/tests/tst_calendarmanager/CMakeLists.txt
+new file mode 100644
+index 0000000..66c959f
+--- /dev/null
++++ b/tests/tst_calendarmanager/CMakeLists.txt
+@@ -0,0 +1,15 @@
++set(SRC tst_calendarmanager.cpp)
++
++add_executable(tst_calendarmanager ${SRC})
++
++target_include_directories(tst_calendarmanager PRIVATE
++ ${PROJECT_SOURCE_DIR}/src
++ ${TARGET_MOC_DIR})
++
++target_link_libraries(tst_calendarmanager
++ Qt5::Qml
++ Qt5::Test
++ KF5::CalendarCore
++ nemocalendar)
++
++add_test(tst_calendarmanager tst_calendarmanager)
+diff --git a/tests/tst_calendarmanager/tst_calendarmanager.pro b/tests/tst_calendarmanager/tst_calendarmanager.pro
+deleted file mode 100644
+index ace2f6d..0000000
+--- a/tests/tst_calendarmanager/tst_calendarmanager.pro
++++ /dev/null
+@@ -1,4 +0,0 @@
+-include(../common.pri)
+-
+-TARGET = tst_calendarmanager
+-SOURCES += tst_calendarmanager.cpp
+diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
+new file mode 100644
+index 0000000..7d81e07
+--- /dev/null
++++ b/tools/CMakeLists.txt
+@@ -0,0 +1 @@
++add_subdirectory(icalconverter)
+diff --git a/tools/icalconverter/CMakeLists.txt b/tools/icalconverter/CMakeLists.txt
+new file mode 100644
+index 0000000..aa094ff
+--- /dev/null
++++ b/tools/icalconverter/CMakeLists.txt
+@@ -0,0 +1,10 @@
++set(SRC main.cpp)
++
++add_executable(icalconverter ${SRC})
++
++target_link_libraries(icalconverter
++ KF5::CalendarCore
++ PkgConfig::MKCAL)
++
++install(TARGETS icalconverter
++ DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/tools/icalconverter/icalconverter.pro b/tools/icalconverter/icalconverter.pro
+deleted file mode 100644
+index fa373c2..0000000
+--- a/tools/icalconverter/icalconverter.pro
++++ /dev/null
+@@ -1,10 +0,0 @@
+-TEMPLATE=app
+-TARGET=icalconverter
+-QT-=gui
+-CONFIG += link_pkgconfig
+-PKGCONFIG += KF5CalendarCore libmkcal-qt5
+-QMAKE_CXXFLAGS += -fPIE -fvisibility=hidden -fvisibility-inlines-hidden
+-SOURCES+=main.cpp
+-
+-target.path = $$INSTALL_ROOT/usr/bin/
+-INSTALLS+=target
+diff --git a/tools/tools.pro b/tools/tools.pro
+deleted file mode 100644
+index 1827543..0000000
+--- a/tools/tools.pro
++++ /dev/null
+@@ -1,2 +0,0 @@
+-TEMPLATE=subdirs
+-SUBDIRS+=icalconverter
+--
+2.31.1
+