Commit 9d6a2988 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix includes

parent 129f9195
cmake_minimum_required(VERSION 2.8.12)
project(KAlarmCal)
# ECM setup
find_package(ECM 0.0.12 CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${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.97.0")
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KALARMCAL
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kalarmcal_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5KAlarmCalConfigVersion.cmake"
SOVERSION 5
)
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5955)
########### Find packages ###########
find_package(KF5KDE4Support ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5PimIdentities ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Holidays ${KF5_VERSION} CONFIG REQUIRED)
if(${CMAKE_SOURCE_DIR} STREQUAL ${Akonadi-Notes_SOURCE_DIR})
find_package(KF5Akonadi CONFIG REQUIRED)
endif()
########### Targets ###########
add_subdirectory(src)
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KF5KAlarmCal")
ecm_configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5KAlarmCalConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5KAlarmCalConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/KF5KAlarmCalConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KF5KAlarmCalConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
install(EXPORT KF5KAlarmCalTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5KAlarmCalTargets.cmake NAMESPACE KF5::)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/kalarmcal_version.h
DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel
)
if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
endif()
@PACKAGE_INIT@
# Any changes in this ".cmake" file will be overwritten by CMake, the source is the ".cmake.in" file.
find_dependency(KF5AkonadiCore "@KF5_VERSION@")
find_dependency(KF5AkonadiWidgets "@KF5_VERSION@")
include("${CMAKE_CURRENT_LIST_DIR}/KF5AkonadiNotesTargets.cmake")
project(kalarmcal)
# The includes in akonadi/ use exceptions, we must enable them here for clang to be happy.
kde_enable_exceptions()
find_package(Qt5 NO_MODULE REQUIRED COMPONENTS Sql)
find_package(KF5 NO_MODULE REQUIRED COMPONENTS CoreAddons ItemViews)
# The library version should be the same as that returned by
# KAEvent::currentCalendarVersion() (see kaevent.cpp)
set(LIB_VERSION 2.7.0)
set(LIB_SOVERSION 2)
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5955)
add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )
......@@ -28,35 +24,35 @@ set(kalarmcal_LIB_SRCS
repetition.cpp
version.cpp
)
# The includes in akonadi/ use exceptions, we must enable them here for clang to be happy.
kde_enable_exceptions()
set(kalarmcal_LIB_SRCS ${kalarmcal_LIB_SRCS}
collectionattribute.cpp
compatibilityattribute.cpp
eventattribute.cpp
)
set(kalarmcal_LIB_SRCS ${kalarmcal_LIB_SRCS}
collectionattribute.cpp
compatibilityattribute.cpp
eventattribute.cpp
)
include_directories(
${CMAKE_BINARY_DIR}/kcalcore
${CMAKE_BINARY_DIR}/akonadi
${CMAKE_BINARY_DIR}/kholidays
${CMAKE_BINARY_DIR}/kpimidentities
)
add_library(kalarmcal ${LIBRARY_TYPE} ${kalarmcal_LIB_SRCS})
generate_export_header(kalarmcal)
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/kalarmcal_export.h" "\n// This library was built to use Akonadi.\n// It must be rebuilt in order to use KResources.\n#ifdef KALARMCAL_USE_KRESOURCES\n#undef KALARMCAL_USE_KRESOURCES\n#endif\n")
target_link_libraries(kalarmcal
kholidays
kpimidentities
add_library(KF5KAlarmCal ${kalarmcal_LIB_SRCS})
generate_export_header(KF5KAlarmCal BASE_NAME kalarmcal)
add_library(KF5::KAlarmCal ALIAS KF5KAlarmCal)
target_link_libraries(KF5KAlarmCal
KF5::Holidays
KF5::PimIdentities
KF5::CoreAddons
KF5::CalendarCore
)
set_target_properties(kalarmcal PROPERTIES
VERSION ${LIB_VERSION}
SOVERSION ${LIB_SOVERSION}
)
install(TARGETS kalarmcal EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
set_target_properties(KF5KAlarmCal PROPERTIES
VERSION ${KALARMCAL_VERSION_STRING}
SOVERSION ${KALARMCAL_SOVERSION}
EXPORT_NAME KAlarmCal
)
install(TARGETS KF5KAlarmCal EXPORT KF5KAlarmCalTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
ecm_generate_headers(KAlarmCal_CamelCase_HEADERS
......@@ -66,7 +62,6 @@ ecm_generate_headers(KAlarmCal_CamelCase_HEADERS
CompatibilityAttribute
DateTime
EventAttribute
KAAlarm
KAEvent
KARecurrence
Repetition
......
......@@ -28,6 +28,7 @@
#include <klocalizedstring.h>
#include <kglobal.h>
#include <QStringList>
#include <QDateTime>
namespace KAlarmCal
{
......
......@@ -27,7 +27,7 @@
#include "kacalendar.h"
#include <akonadi/attribute.h>
#include <AkonadiCore/attribute.h>
#include <QColor>
......
......@@ -26,7 +26,7 @@
#include "kacalendar.h"
#include <akonadi/attribute.h>
#include <AkonadiCore/attribute.h>
namespace KAlarmCal
{
......
......@@ -27,7 +27,7 @@
#include "kaevent.h"
#include <akonadi/attribute.h>
#include <AkonadiCore/attribute.h>
namespace KAlarmCal
{
......
......@@ -27,7 +27,7 @@
#include <kcalcore/filestorage.h>
#include <kcalcore/calendar.h>
#include <kcalcore/event.h>
#include <akonadi/collection.h>
#include <AkonadiCore/collection.h>
#include <QtCore/QByteArray>
#include <QtCore/QStringList>
......
......@@ -30,8 +30,8 @@
#include "kacalendar.h"
#include "repetition.h"
#include <akonadi/collection.h>
#include <akonadi/item.h>
#include <AkonadiCore/collection.h>
#include <AkonadiCore/item.h>
#include <kcalcore/person.h>
#include <kcalcore/calendar.h>
......
......@@ -30,6 +30,7 @@
#include <qdebug.h>
#include <QBitArray>
#include <QDate>
using namespace KCalCore;
namespace KAlarmCal
......
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