Commit 73c15dce authored by Laurent Montel's avatar Laurent Montel 😁

Fix includes/fix search module compile++

parent b46d9afa
project(resources)
find_package(ECM 0.0.12 CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${resources_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})
include(GenerateExportHeader)
include(ECMGenerateHeaders)
include(ECMGeneratePriFile)
include(ECMPackageConfigHelpers)
include(ECMSetupVersion)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings)
set(KF5_VERSION "4.98.0")
set(QT_REQUIRED_VERSION "5.2.0")
find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5KDELibs4Support ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Akonadi ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5CalendarCore ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5PimUtils ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Abc ${KF5_VERSION} CONFIG REQUIRED)
# Xsltproc
find_package(Xsltproc)
set_package_properties(Xsltproc PROPERTIES DESCRIPTION "XSLT processor from libxslt" TYPE REQUIRED PURPOSE "Required to generate D-Bus interfaces for all Akonadi resources.")
#add_definitions( -DQT_NO_CAST_FROM_ASCII )
#add_definitions( -DQT_NO_CAST_TO_ASCII )
......@@ -38,19 +66,19 @@ set( AKONADI_IMAPATTRIBUTES_SHARED_SOURCES
#add_subdirectory( akonotes )
#add_subdirectory( kalarm )
#add_subdirectory( contacts )
#macro_optional_add_subdirectory( dav )
#add_subdirectory( dav )
#add_subdirectory( ical )
#add_subdirectory( imap )
#macro_optional_add_subdirectory( kdeaccounts )
#add_subdirectory( kdeaccounts )
#if (Libkolab_FOUND AND Libkolabxml_FOUND)
# macro_optional_add_subdirectory( kolabproxy )
#endif()
#macro_optional_add_subdirectory( localbookmarks )
add_subdirectory( localbookmarks )
#add_subdirectory( maildir )
#macro_optional_add_subdirectory( openxchange )
#add_subdirectory( openxchange )
#add_subdirectory( pop3 )
#if( LibKGAPI2_FOUND )
......@@ -62,7 +90,7 @@ set( AKONADI_IMAPATTRIBUTES_SHARED_SOURCES
#endif()
#add_subdirectory( shared )
#add_subdirectory( birthdays )
add_subdirectory( birthdays )
#add_subdirectory( mixedmaildir )
#add_subdirectory( mailtransport_dummy )
#add_subdirectory( mbox )
......
......@@ -36,7 +36,7 @@ install( FILES akonotesresource.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/sha
add_library(akonadi_akonotes_resource MODULE ${akonotesresource_SRCS})
target_link_libraries(akonadi_akonotes_resource KF5::AkonadiCore ${KDEPIMLIBS_AKONADI_KMIME_LIBS} maildir ${QT_QTDBUS_LIBRARY} KF5::KIOCore KF5::KMime folderarchivesettings)
target_link_libraries(akonadi_akonotes_resource KF5::AkonadiCore KF5::AkonadiKMime maildir KF5::KIOCore KF5::KMime folderarchivesettings)
install(TARGETS akonadi_akonotes_resource DESTINATION ${PLUGIN_INSTALL_DIR})
......@@ -19,6 +19,6 @@
#include "akonotesresource.h"
#include <akonadi/agentfactory.h>
#include <agentfactory.h>
AKONADI_AGENT_FACTORY( AkonotesResource, akonadi_akonotes_resource )
......@@ -2,6 +2,7 @@ include_directories( ${Boost_INCLUDE_DIR} )
kde_enable_exceptions()
set( birthdayresource_srcs
birthdaysresource.cpp
configdialog.cpp
......@@ -26,9 +27,10 @@ endif ()
target_link_libraries(akonadi_birthdays_resource
KF5::KIOCore
KF5::AkonadiCore
${KDEPIMLIBS_KABC_LIBS}
KF5::CalendarCore
KF5::PimUtils
KF5::AkonadiAgentBase
KF5::Abc
)
install( TARGETS akonadi_birthdays_resource ${INSTALL_TARGETS_DEFAULT_ARGS} )
......
......@@ -23,12 +23,12 @@
#include "settingsadaptor.h"
#include "configdialog.h"
#include <akonadi/collectionfetchjob.h>
#include <akonadi/itemfetchjob.h>
#include <akonadi/itemfetchscope.h>
#include <akonadi/mimetypechecker.h>
#include <akonadi/monitor.h>
#include <akonadi/entitydisplayattribute.h>
#include <collectionfetchjob.h>
#include <itemfetchjob.h>
#include <itemfetchscope.h>
#include <mimetypechecker.h>
#include <monitor.h>
#include <entitydisplayattribute.h>
#include <kabc/addressee.h>
......
......@@ -23,7 +23,7 @@
#include <kcalcore/event.h>
#include <akonadi/resourcebase.h>
#include <resourcebase.h>
#include <QHash>
......
......@@ -22,6 +22,8 @@
#include "settings.h"
#include <kconfigdialogmanager.h>
#include <KIcon>
#include <KLocalizedString>
ConfigDialog::ConfigDialog(QWidget* parent)
: KDialog( parent )
......
# Find xsltproc executable and provide a macro to generate D-Bus interfaces.
#
# The following variables are defined :
# XSLTPROC_EXECUTABLE - path to the xsltproc executable
# Xsltproc_FOUND - true if the program was found
#
find_program(XSLTPROC_EXECUTABLE xsltproc DOC "Path to the xsltproc executable")
mark_as_advanced(XSLTPROC_EXECUTABLE)
if(XSLTPROC_EXECUTABLE)
set(Xsltproc_FOUND TRUE)
# We depend on kdepimlibs, make sure it's found
if(NOT DEFINED KDEPIMLIBS_DATA_DIR)
find_package(KdepimLibs REQUIRED)
endif()
# Macro to generate a D-Bus interface description from a KConfigXT file
macro(kcfg_generate_dbus_interface _kcfg _name)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_name}.xml
COMMAND ${XSLTPROC_EXECUTABLE} --stringparam interfaceName ${_name}
${KDEPIMLIBS_DATA_DIR}/akonadi-kde/kcfg2dbus.xsl
${_kcfg}
> ${CMAKE_CURRENT_BINARY_DIR}/${_name}.xml
DEPENDS ${KDEPIMLIBS_DATA_DIR}/akonadi-kde/kcfg2dbus.xsl
${_kcfg}
)
endmacro()
endif()
include_directories(
${kdepim-runtime_SOURCE_DIR}
${QT_QTDBUS_INCLUDE_DIR}
)
kde_enable_exceptions()
add_subdirectory( wizard )
......@@ -27,8 +22,6 @@ add_library(akonadi_contacts_resource MODULE ${contactsresource_SRCS})
target_link_libraries(akonadi_contacts_resource
KF5::AkonadiCore
${QT_QTCORE_LIBRARY}
${KDE4_KDECORE_LIBS}
${KDEPIMLIBS_KABC_LIBS}
KF5::KIOCore
)
......
......@@ -27,12 +27,12 @@
#include <QtCore/QDirIterator>
#include <QtCore/QFile>
#include <akonadi/changerecorder.h>
#include <akonadi/collectionfetchscope.h>
#include <akonadi/entitydisplayattribute.h>
#include <akonadi/itemfetchscope.h>
#include <akonadi/dbusconnectionpool.h>
#include <akonadi/agentfactory.h>
#include <changerecorder.h>
#include <collectionfetchscope.h>
#include <entitydisplayattribute.h>
#include <itemfetchscope.h>
#include <dbusconnectionpool.h>
#include <agentfactory.h>
using namespace Akonadi;
using namespace Akonadi_Contacts_Resource;
......
......@@ -20,7 +20,7 @@
#ifndef CONTACTSRESOURCE_H
#define CONTACTSRESOURCE_H
#include <akonadi/resourcebase.h>
#include <resourcebase.h>
#include <kabc/addressee.h>
#include <kabc/contactgroup.h>
......
......@@ -22,8 +22,8 @@
#include "davprotocolattribute.h"
#include "davprotocolbase.h"
#include <akonadi/collection.h>
#include <akonadi/item.h>
#include <collection.h>
#include <item.h>
#include <kabc/addressee.h>
#include <kabc/vcardconverter.h>
#include <kcalcore/icalformat.h>
......
......@@ -18,10 +18,10 @@
#include "etagcache.h"
#include <akonadi/collection.h>
#include <akonadi/item.h>
#include <akonadi/itemfetchjob.h>
#include <akonadi/itemfetchscope.h>
#include <collection.h>
#include <item.h>
#include <itemfetchjob.h>
#include <itemfetchscope.h>
#include <kdebug.h>
#include <kjob.h>
......
......@@ -43,13 +43,13 @@
#include <kdatetime.h>
#include <kjob.h>
#include <akonadi/attributefactory.h>
#include <akonadi/cachepolicy.h>
#include <akonadi/changerecorder.h>
#include <akonadi/collectionfetchscope.h>
#include <akonadi/entitydisplayattribute.h>
#include <akonadi/itemfetchjob.h>
#include <akonadi/itemfetchscope.h>
#include <attributefactory.h>
#include <cachepolicy.h>
#include <changerecorder.h>
#include <collectionfetchscope.h>
#include <entitydisplayattribute.h>
#include <itemfetchjob.h>
#include <itemfetchscope.h>
#include <kabc/addressee.h>
#include <kabc/vcardconverter.h>
......
......@@ -21,8 +21,8 @@
#include "etagcache.h"
#include <akonadi/resourcebase.h>
#include <akonadi/calendar/freebusyproviderbase.h>
#include <resourcebase.h>
#include <calendar/freebusyproviderbase.h>
class DavFreeBusyHandler;
class KDateTime;
......
......@@ -19,7 +19,7 @@
#ifndef DAVPROTOCOLATTRIBUTE_H
#define DAVPROTOCOLATTRIBUTE_H
#include <akonadi/attribute.h>
#include <attribute.h>
#include <QtCore/QString>
......
......@@ -62,9 +62,9 @@ target_link_libraries(akonadi_facebook_resource
KF5::AkonadiCore
${KDEPIMLIBS_KABC_LIBS}
KF5::CalendarCore
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTDBUS_LIBRARY}
${QJSON_LIBRARIES}
${KDE4_KDECORE_LIBS}
KF5::KMime
......
......@@ -48,7 +48,7 @@
#include <Akonadi/ItemFetchJob>
#include <Akonadi/ItemFetchScope>
#include <Akonadi/ChangeRecorder>
#include <akonadi/notes/noteutils.h> //krazy:exclude=camelcase wait for kdepimlibs 4.11
#include <notes/noteutils.h> //krazy:exclude=camelcase wait for kdepimlibs 4.11
#include <Akonadi/SocialUtils/SocialNetworkAttributes>
......
......@@ -20,7 +20,7 @@ kde4_add_library(folderarchivesettings ${LIBRARY_TYPE} ${folderarchivesettings_S
target_link_libraries(folderarchivesettings
KF5::KMime
${AKONADI_COMMON_LIBRARIES}
${QT_QTGUI_LIBRARY}
KF5::AkonadiCore
)
......
......@@ -10,7 +10,8 @@ kde_enable_exceptions()
add_subdirectory( wizard )
add_subdirectory( notes )
add_subdirectory( tests )
#REACTIVATE IT
#add_subdirectory( tests )
########### next target ###############
add_definitions( -DSETTINGS_NAMESPACE=Akonadi_ICal_Resource )
......@@ -39,6 +40,6 @@ if (Q_WS_MAC)
set_target_properties(akonadi_ical_resource PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi ICal Resource")
endif ()
target_link_libraries(akonadi_ical_resource KF5::AkonadiCore ${QT_QTDBUS_LIBRARY} KF5::KIOCore KF5::CalendarCore)
target_link_libraries(akonadi_ical_resource KF5::AkonadiCore KF5::KIOCore KF5::CalendarCore)
install(TARGETS akonadi_ical_resource DESTINATION ${PLUGIN_INSTALL_DIR})
......@@ -19,7 +19,7 @@
#include "icalresource.h"
#include <akonadi/agentfactory.h>
#include <agentfactory.h>
#include <QtCore/QtPlugin>
......
......@@ -19,7 +19,7 @@
#include "notesresource.h"
#include <akonadi/agentfactory.h>
#include <agentfactory.h>
#include <kcalcore/incidence.h>
......
......@@ -22,7 +22,7 @@
#include "icalsettingsadaptor.h"
#include "singlefileresourceconfigdialog.h"
#include <akonadi/dbusconnectionpool.h>
#include <dbusconnectionpool.h>
#include <kcalcore/filestorage.h>
#include <kcalcore/memorycalendar.h>
......
......@@ -33,7 +33,7 @@ endif ()
target_link_libraries(akonadi_icaldir_resource
KF5::AkonadiCore
${QT_QTCORE_LIBRARY}
${KDE4_KDECORE_LIBS}
KF5::CalendarCore
KF5::KIOCore
......
......@@ -24,9 +24,9 @@
#include "settingsadaptor.h"
#include "../shared/dirsettingsdialog.h"
#include <akonadi/changerecorder.h>
#include <akonadi/entitydisplayattribute.h>
#include <akonadi/itemfetchscope.h>
#include <changerecorder.h>
#include <entitydisplayattribute.h>
#include <itemfetchscope.h>
#include <KCalCore/MemoryCalendar>
#include <KCalCore/FileStorage>
......
......@@ -21,7 +21,7 @@
#ifndef ICALDIRRESOURCE_H
#define ICALDIRRESOURCE_H
#include <akonadi/resourcebase.h>
#include <resourcebase.h>
#include <KCalCore/Incidence>
......
......@@ -47,7 +47,7 @@ set( imapresource_LIB_SRCS
kde4_add_library(imapresource STATIC ${imapresource_LIB_SRCS})
target_link_libraries(imapresource KF5::AkonadiCore ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${KDEPIMLIBS_KIMAP_LIBS} KF5::MailTransport KF5::KIOCore KF5::KMime ${KDEPIMLIBS_AKONADI_KMIME_LIBS} KF5::KF5PimIdentities)
target_link_libraries(imapresource KF5::AkonadiCore KF5::Imap KF5::MailTransport KF5::KIOCore KF5::KMime KF5::AkonadiKMime KF5::KF5PimIdentities)
if( NOT IMAPRESOURCE_NO_SOLID)
target_link_libraries(imapresource ${KDE4_SOLID_LIBS})
......@@ -97,7 +97,7 @@ if (Q_WS_MAC)
set_target_properties(akonadi_imap_resource PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi IMAP Resource")
endif ()
target_link_libraries(akonadi_imap_resource KF5::AkonadiCore ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${KDEPIMLIBS_KIMAP_LIBS} KF5::MailTransport KF5::KIOCore KF5::KMime ${KDEPIMLIBS_AKONADI_KMIME_LIBS} KF5::KF5PimIdentities imapresource folderarchivesettings)
target_link_libraries(akonadi_imap_resource KF5::AkonadiCore KF5::Imap KF5::MailTransport KF5::KIOCore KF5::KMime KF5::AkonadiKMime KF5::KF5PimIdentities imapresource folderarchivesettings)
if (RUNTIME_PLUGINS_STATIC)
target_link_libraries(akonadi_imap_resource akonadi_serializer_mail)
......
......@@ -31,7 +31,7 @@
#include <kimap/setmetadatajob.h>
#include <kimap/subscribejob.h>
#include <akonadi/collectiondeletejob.h>
#include <collectiondeletejob.h>
AddCollectionTask::AddCollectionTask( ResourceStateInterface::Ptr resource, QObject *parent )
: ResourceTask( DeferIfNoSession, resource, parent ), m_pendingJobs( 0 ), m_session(0)
......
......@@ -28,7 +28,7 @@
#include "resourcestateinterface.h"
#include <akonadi/collection.h>
#include <collection.h>
#include <QObject>
#include <QPointer>
......
......@@ -33,16 +33,16 @@
#include <kstandarddirs.h>
#include <KWindowSystem>
#include <akonadi/agentmanager.h>
#include <akonadi/attributefactory.h>
#include <akonadi/collectionfetchjob.h>
#include <akonadi/collectionfetchscope.h>
#include <akonadi/changerecorder.h>
#include <akonadi/itemfetchscope.h>
#include <akonadi/itemfetchjob.h>
#include <akonadi/specialcollections.h>
#include <akonadi/session.h>
#include <akonadi/kmime/messageparts.h>
#include <agentmanager.h>
#include <attributefactory.h>
#include <collectionfetchjob.h>
#include <collectionfetchscope.h>
#include <changerecorder.h>
#include <itemfetchscope.h>
#include <itemfetchjob.h>
#include <specialcollections.h>
#include <session.h>
#include <kmime/messageparts.h>
#include "collectionannotationsattribute.h"
#include "collectionflagsattribute.h"
......@@ -101,7 +101,7 @@ ImapResource::ImapResource( const QString &id )
{
if ( name() == identifier() ) {
const QString agentType = AgentManager::self()->instance( identifier() ).type().identifier();
const QString agentsrcFile = KGlobal::dirs()->localxdgconfdir() + QLatin1String("akonadi/agentsrc");
const QString agentsrcFile = KGlobal::dirs()->localxdgconfdir() + QLatin1String("agentsrc");
const QSettings agentsrc( agentsrcFile, QSettings::IniFormat );
const int instanceCounter = agentsrc.value(
......
......@@ -26,8 +26,8 @@
#ifndef RESOURCES_IMAP_IMAPRESOURCE_H
#define RESOURCES_IMAP_IMAPRESOURCE_H
#include <akonadi/resourcebase.h>
#include <akonadi/agentsearchinterface.h>
#include <resourcebase.h>
#include <agentsearchinterface.h>
#include <KDialog>
#include <QPointer>
......
......@@ -21,7 +21,7 @@
#include <QByteArray>
#include <akonadi/attribute.h>
#include <attribute.h>
NoInferiorsAttribute::NoInferiorsAttribute( bool noInferiors )
: mNoInferiors( noInferiors )
......
......@@ -20,7 +20,7 @@
#ifndef NOINFERIORSATTRIBUTE_H
#define NOINFERIORSATTRIBUTE_H
#include <akonadi/attribute.h>
#include <attribute.h>
class NoInferiorsAttribute : public Akonadi::Attribute
{
......
......@@ -21,7 +21,7 @@
#include <QByteArray>
#include <akonadi/attribute.h>
#include <attribute.h>
NoSelectAttribute::NoSelectAttribute( bool noSelect )
: mNoSelect( noSelect )
......
......@@ -20,7 +20,7 @@
#ifndef NOSELECTATTRIBUTE_H
#define NOSELECTATTRIBUTE_H
#include <akonadi/attribute.h>
#include <attribute.h>
class NoSelectAttribute : public Akonadi::Attribute
{
......
......@@ -21,7 +21,7 @@
#include "removecollectionrecursivetask.h"
#include <akonadi/kmime/messageflags.h>
#include <kmime/messageflags.h>
#include <kimap/deletejob.h>
#include <kimap/expungejob.h>
#include <kimap/selectjob.h>
......
......@@ -28,8 +28,8 @@
#include "noselectattribute.h"
#include "timestampattribute.h"
#include <akonadi/collectionmodifyjob.h>
#include <akonadi/agentsearchinterface.h>
#include <collectionmodifyjob.h>
#include <agentsearchinterface.h>
#include <kmessagebox.h>
ResourceStateInterface::Ptr ResourceState::createRetrieveItemState( ImapResource *resource,
......
......@@ -21,7 +21,7 @@
#include "resourcetask.h"
#include <akonadi/kmime/messageflags.h>
#include <kmime/messageflags.h>
#include <KDE/KLocale>
......
......@@ -31,8 +31,8 @@
#include <kimap/session.h>
#include <klocale.h>
#include <akonadi/collectionquotaattribute.h>
#include <akonadi/entitydisplayattribute.h>
#include <collectionquotaattribute.h>
#include <entitydisplayattribute.h>