summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2013-10-02 15:30:58 (GMT)
committerChristian Mollekopf <chrigi_1@fastmail.fm>2013-10-02 15:30:58 (GMT)
commit4944d6a937fe2527a45b2aa064e6fd755ee2c0f5 (patch)
tree92f4ab324e82a9e0e55b667eff86a3bdff6f407e
parent5d65dda800387ba77f2b0376f2caaa914092edb0 (diff)
downloadlibcalendaring-4944d6a937fe2527a45b2aa064e6fd755ee2c0f5.tar.gz
Compile kdepimlibs code from submodule.
-rw-r--r--CMakeLists.txt8
-rw-r--r--kdepimlibs/CMakeLists.txt2
-rw-r--r--kdepimlibs/kcalcore/CMakeLists.txt183
3 files changed, 186 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 00408a5..44a4cdb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,13 +43,7 @@ set(INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION ${BIN_INSTALL_DIR}
# set(CMAKE_AUTOMOC ON)
add_subdirectory(kdecore)
-add_subdirectory(kmime)
-add_subdirectory(kcalcore)
-add_subdirectory(kimap)
-add_subdirectory(kabc)
-add_subdirectory(notes)
-add_subdirectory(kpimutils)
-add_subdirectory(kcalutils)
+add_subdirectory(kdepimlibs)
install( FILES kdemacros.h
DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
diff --git a/kdepimlibs/CMakeLists.txt b/kdepimlibs/CMakeLists.txt
new file mode 100644
index 0000000..47466c1
--- /dev/null
+++ b/kdepimlibs/CMakeLists.txt
@@ -0,0 +1,2 @@
+
+add_subdirectory(kcalcore)
diff --git a/kdepimlibs/kcalcore/CMakeLists.txt b/kdepimlibs/kcalcore/CMakeLists.txt
new file mode 100644
index 0000000..fc2e75c
--- /dev/null
+++ b/kdepimlibs/kcalcore/CMakeLists.txt
@@ -0,0 +1,183 @@
+project(kcalcore)
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/cmake/modules")
+
+set(LIBCALENDARING_KCALCORE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../kdepimlibs/kcalcore")
+
+cmake_minimum_required(VERSION 2.6)
+
+# only available from cmake-2.8.0
+if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7)
+ cmake_policy(SET CMP0012 NEW)
+endif()
+
+# only available from cmake-2.8.4
+if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7 AND
+ ${CMAKE_PATCH_VERSION} GREATER 3)
+ cmake_policy(SET CMP0017 NEW)
+endif()
+
+find_package(Qt4 4.6.0 REQUIRED)
+
+include_directories(${QT_INCLUDES})
+
+#include(GenerateExportHeader)
+
+############### Build Options ###############
+
+# The following macros can be defined to alter how KCalCore is built.
+# For example, cmake -DKCALCORE_FOR_MEEGO=true
+
+# KCALCORE_FOR_MEEGO - builds KCalCore with some special features for the MeeGo platform.
+# option(KCALCORE_FOR_MEEGO "Build KCalCore especially for the MeeGo." FALSE)
+
+# KCALCORE_FOR_SYMBIAN - builds KCalCore with some special features for the Symbian platform.
+# option(KCALCORE_FOR_SYMBIAN "Build KCalCore especially for the Symbian." FALSE)
+
+# add C++ macro definitions for options passed to CMake
+# if(KCALCORE_FOR_MEEGO)
+# add_definitions(-DKCALCORE_FOR_MEEGO)
+# endif()
+# if(KCALCORE_FOR_SYMBIAN)
+# add_definitions(-DKCALCORE_FOR_SYMBIAN)
+# endif()
+
+############### Find packages ###############
+# FIXME KDE5PORT needed: kdatetime which belongs to kdecore
+# find_package(kcoreaddons REQUIRED)
+# include_directories(${kcoreaddons_INCLUDE_DIR} ${kcoreaddons_INCLUDE_DIR}/KDE)
+
+
+find_package(Libical "0.42" REQUIRED)
+
+
+include_directories( ../../kdecore ../../kdecore/includes ../../kdecore/includes/KDE ../kdepimlibs/includes)
+
+
+###########################################################
+
+add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5810)
+
+include(${LIBCALENDARING_KCALCORE_PATH}/ConfigureChecks.cmake)
+configure_file(${LIBCALENDARING_KCALCORE_PATH}/config-kcalcore.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kcalcore.h)
+
+if(KDE4_BUILD_TESTS)
+ add_definitions(-DCOMPILING_TESTS)
+endif()
+
+include_directories(
+ ${LIBICAL_INCLUDE_DIRS}
+ ${LIBICAL_INCLUDE_DIRS}/libical
+ ${CMAKE_CURRENT_SOURCE_DIR}/versit
+ ${KDE4_INCLUDE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+########### next target ###############
+
+set(libversit_SRCS
+ ${LIBCALENDARING_KCALCORE_PATH}/versit/vcc.c
+ ${LIBCALENDARING_KCALCORE_PATH}/versit/vobject.c
+)
+
+set(kcalcore_LIB_SRCS ${libversit_SRCS}
+ ${LIBCALENDARING_KCALCORE_PATH}/alarm.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/attachment.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/attendee.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/calendar.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/calfilter.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/calformat.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/calstorage.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/compat.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/customproperties.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/duration.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/event.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/exceptions.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/filestorage.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/freebusy.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/freebusycache.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/freebusyurlstore.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/freebusyperiod.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/icalformat.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/icalformat_p.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/icaltimezones.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/incidence.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/incidencebase.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/journal.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/memorycalendar.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/period.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/person.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/recurrence.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/recurrencerule.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/schedulemessage.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/sorting.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/todo.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/vcalformat.cpp
+ ${LIBCALENDARING_KCALCORE_PATH}/visitor.cpp
+)
+
+set(CMAKE_AUTOMOC TRUE)
+# QT4_AUTOMOC(${kcalcore_LIB_SRCS})
+
+add_library(calendaring-kcalcore ${LIBRARY_TYPE} ${kcalcore_LIB_SRCS})
+# generate_export_header(kcalcore)
+
+#${KDE4_KDECORE_LIBRARY}
+target_link_libraries(calendaring-kcalcore calendaring-kdecore ${QT_QTGUI_LIBRARY} ${LIBICAL_LIBRARIES})
+
+if(HAVE_UUID_LIBRARY)
+ target_link_libraries(calendaring-kcalcore uuid)
+endif()
+
+# set(libcalendaring-kcalcore ${libcalendaring-kcalcore} PARENT_SCOPE)
+# message("${libcalendaring-kcalcore}")
+set_target_properties(calendaring-kcalcore PROPERTIES
+ VERSION ${ECM_VERSION_STRING}
+ SOVERSION ${ECM_SOVERSION}
+)
+
+install(TARGETS calendaring-kcalcore EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
+
+########### next target ###############
+
+#add_subdirectory(tests)
+
+########### install files ###############
+
+install(FILES
+ ${LIBCALENDARING_KCALCORE_PATH}/kcalcore_export.h
+ ${LIBCALENDARING_KCALCORE_PATH}/alarm.h
+ ${LIBCALENDARING_KCALCORE_PATH}/attachment.h
+ ${LIBCALENDARING_KCALCORE_PATH}/attendee.h
+ ${LIBCALENDARING_KCALCORE_PATH}/calendar.h
+ ${LIBCALENDARING_KCALCORE_PATH}/calfilter.h
+ ${LIBCALENDARING_KCALCORE_PATH}/calformat.h
+ ${LIBCALENDARING_KCALCORE_PATH}/calstorage.h
+ ${LIBCALENDARING_KCALCORE_PATH}/compat.h
+ ${LIBCALENDARING_KCALCORE_PATH}/customproperties.h
+ ${LIBCALENDARING_KCALCORE_PATH}/duration.h
+ ${LIBCALENDARING_KCALCORE_PATH}/event.h
+ ${LIBCALENDARING_KCALCORE_PATH}/exceptions.h
+ ${LIBCALENDARING_KCALCORE_PATH}/filestorage.h
+ ${LIBCALENDARING_KCALCORE_PATH}/freebusy.h
+ ${LIBCALENDARING_KCALCORE_PATH}/freebusycache.h
+ ${LIBCALENDARING_KCALCORE_PATH}/freebusyperiod.h
+ ${LIBCALENDARING_KCALCORE_PATH}/freebusyurlstore.h
+ ${LIBCALENDARING_KCALCORE_PATH}/icalformat.h
+ ${LIBCALENDARING_KCALCORE_PATH}/icaltimezones.h
+ ${LIBCALENDARING_KCALCORE_PATH}/incidence.h
+ ${LIBCALENDARING_KCALCORE_PATH}/incidencebase.h
+ ${LIBCALENDARING_KCALCORE_PATH}/journal.h
+ ${LIBCALENDARING_KCALCORE_PATH}/memorycalendar.h
+ ${LIBCALENDARING_KCALCORE_PATH}/period.h
+ ${LIBCALENDARING_KCALCORE_PATH}/person.h
+ ${LIBCALENDARING_KCALCORE_PATH}/recurrence.h
+ ${LIBCALENDARING_KCALCORE_PATH}/recurrencerule.h
+ ${LIBCALENDARING_KCALCORE_PATH}/schedulemessage.h
+ ${LIBCALENDARING_KCALCORE_PATH}/sortablelist.h
+ ${LIBCALENDARING_KCALCORE_PATH}/sorting.h
+ ${LIBCALENDARING_KCALCORE_PATH}/supertrait.h
+ ${LIBCALENDARING_KCALCORE_PATH}/todo.h
+ ${LIBCALENDARING_KCALCORE_PATH}/vcalformat.h
+ ${LIBCALENDARING_KCALCORE_PATH}/visitor.h
+ DESTINATION ${INCLUDE_INSTALL_DIR}/kcalcore COMPONENT Devel)