Verified Commit 93fac16d authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

Fix build of examples

parent 8eb8a5e9
......@@ -5,6 +5,9 @@ set(KGAPI_LIB_VERSION ${PIM_VERSION})
project(kgapi VERSION ${KGAPI_LIB_VERSION})
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
# ECM setup
set(KF5_MIN_VERSION "5.87.0")
......@@ -19,6 +22,7 @@ include(KDECompilerSettings NO_POLICY_SCOPE)
include(GenerateExportHeader)
include(ECMGenerateHeaders)
include(ECMGeneratePriFile)
include(ECMQtDeclareLoggingCategory)
include(ECMPoQmTools)
include(ECMSetupVersion)
......
......@@ -9,4 +9,6 @@ SORT_MEMBER_DOCS = YES
## from function definitions.
PREDEFINED = LIBKGAPI_EXPORT="" \
Q_SLOTS="slots" \
Q_SIGNALS="signals"
\ No newline at end of file
Q_SIGNALS="signals"
ALIASES = "accessors=\par Accessors:^^"
kde_enable_exceptions()
add_executable(contacts-example)
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}
)
set(contacts_example_SRCS main.cpp mainwindow.cpp)
set(contacts_example_HDRS mainwindow.h)
qt_wrap_ui(contacts_example_SRCS ui/main.ui)
add_executable(contacts-example
${contacts_example_SRCS}
${contacts_example_HDRS_MOC}
target_sources(contacts-example PRIVATE
main.cpp
mainwindow.cpp
mainwindow.ui
)
target_link_libraries(contacts-example
KF5::Contacts
Qt::Widgets
Qt::Core
KF5::GAPICore
KF5::GAPIContacts
KPimGAPICore
KPimGAPIContacts
)
......@@ -7,12 +7,12 @@
#include "mainwindow.h"
#include "ui_main.h"
#include "ui_mainwindow.h"
#include <contacts/contact.h>
#include <contacts/contactfetchjob.h>
#include <authjob.h>
#include <account.h>
#include "contacts/contact.h"
#include "contacts/contactfetchjob.h"
#include "core/authjob.h"
#include "core/account.h"
#include <QListWidgetItem>
......
kde_enable_exceptions()
add_executable(drives-example)
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}
)
set(drives_example_SRCS main.cpp mainwindow.cpp)
set(drives_example_HDRS mainwindow.h)
qt_wrap_ui(drives_example_SRCS ui/main.ui)
add_executable(drives-example
${drives_example_SRCS}
${drives_example_HDRS_MOC}
target_sources(drives-example PRIVATE
main.cpp
mainwindow.cpp
mainwindow.ui
)
target_link_libraries(drives-example
Qt::Widgets
Qt::Core
KF5::GAPICore
KF5::GAPIDrive
Qt::Widgets
KPimGAPICore
KPimGAPIDrive
)
......@@ -6,20 +6,20 @@
#include "mainwindow.h"
#include "ui_main.h"
#include <drive/drives.h>
#include <drive/drivescreatejob.h>
#include <drive/drivesdeletejob.h>
#include <drive/drivesfetchjob.h>
#include <drive/drivesmodifyjob.h>
#include <drive/driveshidejob.h>
#include <drive/drivessearchquery.h>
#include <drive/file.h>
#include <drive/filesearchquery.h>
#include <drive/filefetchjob.h>
#include <authjob.h>
#include <account.h>
#include "ui_mainwindow.h"
#include "drive/drives.h"
#include "drive/drivescreatejob.h"
#include "drive/drivesdeletejob.h"
#include "drive/drivesfetchjob.h"
#include "drive/drivesmodifyjob.h"
#include "drive/driveshidejob.h"
#include "drive/drivessearchquery.h"
#include "drive/file.h"
#include "drive/filesearchquery.h"
#include "drive/filefetchjob.h"
#include "core/authjob.h"
#include "core/account.h"
#include <QListWidgetItem>
#include <QUuid>
......
kde_enable_exceptions()
add_executable(files-example)
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}
)
set(files_example_SRCS main.cpp mainwindow.cpp)
set(files_example_HDRS mainwindow.h)
qt_wrap_ui(files_example_SRCS ui/main.ui)
add_executable(files-example
${files_example_SRCS}
${files_example_HDRS_MOC}
target_sources(files-example PRIVATE
main.cpp
mainwindow.cpp
mainwindow.ui
)
target_link_libraries(files-example
Qt::Widgets
Qt::Core
KF5::GAPICore
KF5::GAPIDrive
KPimGAPICore
KPimGAPIDrive
)
......@@ -6,11 +6,11 @@
#include "mainwindow.h"
#include "ui_main.h"
#include "ui_mainwindow.h"
#include <drive/file.h>
#include <authjob.h>
#include <account.h>
#include "drive/file.h"
#include "core/authjob.h"
#include "core/account.h"
#include <QFileDialog>
#include <QDebug>
......
kde_enable_exceptions()
add_executable(permissions-example)
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}
)
set(permissions_example_SRCS main.cpp mainwindow.cpp)
set(permissions_example_HDRS mainwindow.h)
qt_wrap_ui(permissions_example_SRCS ui/main.ui)
add_executable(permissions-example
${permissions_example_SRCS}
${permissions_example_HDRS_MOC}
target_sources(permissions-example PRIVATE
main.cpp
mainwindow.cpp
mainwindow.ui
)
target_link_libraries(permissions-example
Qt::Widgets
Qt::Core
KF5::GAPICore
KF5::GAPIDrive
KPimGAPICore
KPimGAPIDrive
)
......@@ -6,11 +6,11 @@
#include "mainwindow.h"
#include "ui_main.h"
#include "ui_mainwindow.h"
#include <drive/permissionfetchjob.h>
#include <authjob.h>
#include <account.h>
#include "drive/permissionfetchjob.h"
#include "core/authjob.h"
#include "core/account.h"
#include <QListWidgetItem>
......
kde_enable_exceptions()
add_executable(staticmaps-example)
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
)
set(staticmaps_example_SRCS main.cpp mainwindow.cpp)
set(staticmaps_example_HDRS mainwindow.h)
qt_wrap_ui(staticmaps_example_SRCS ui/main.ui)
qt_wrap_cpp(staticmaps_example_HDRS_MOC ${staticmaps_example_HDRS})
add_executable(staticmaps-example
${staticmaps_example_SRCS}
${staticmaps_example_HDRS_MOC}
target_sources(staticmaps-example PRIVATE
main.cpp
mainwindow.cpp
mainwindow.ui
)
target_link_libraries(staticmaps-example
Qt::Widgets
KF5::Contacts
kgapi2
KPimGapiStaticMaps
)
add_dependencies(staticmaps-example kgapi2)
......@@ -6,9 +6,9 @@
#include "mainwindow.h"
#include "ui_main.h"
#include "ui_mainwindow.h"
#include <libkgapi2/staticmaps/staticmapurl.h>
#include "staticmaps/staticmapurl.h"
using namespace KGAPI2;
......
kde_enable_exceptions()
add_executable(tasks-example)
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}
)
set(tasks_example_SRCS main.cpp mainwindow.cpp)
set(tasks_example_HDRS mainwindow.h)
qt_wrap_ui(tasks_example_SRCS ui/main.ui)
add_executable(tasks-example
${tasks_example_SRCS}
${tasks_example_HDRS_MOC}
target_sources(tasks-example PRIVATE
main.cpp
mainwindow.cpp
mainwindow.ui
)
target_link_libraries(tasks-example
Qt::Widgets
Qt::Core
KF5::GAPICore
KF5::GAPITasks
KPimGAPICore
KPimGAPITasks
)
......@@ -6,15 +6,15 @@
#include "mainwindow.h"
#include "ui_main.h"
#include <tasks/tasklist.h>
#include <tasks/tasklistcreatejob.h>
#include <tasks/tasklistfetchjob.h>
#include <tasks/taskfetchjob.h>
#include <tasks/taskcreatejob.h>
#include <authjob.h>
#include <account.h>
#include "ui_mainwindow.h"
#include "tasks/tasklist.h"
#include "tasks/tasklistcreatejob.h"
#include "tasks/tasklistfetchjob.h"
#include "tasks/taskfetchjob.h"
#include "tasks/taskcreatejob.h"
#include "core/authjob.h"
#include "core/account.h"
#include <QListWidgetItem>
#include <QDebug>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment