summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2012-06-28 08:05:30 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2012-06-28 08:05:30 (GMT)
commit614e083f3bf5c59fd3ab3035697d25cbf9295d7a (patch)
treed40756d6f2192384bdb84223244732cf5aa8da38
parentb99d69b8f85c5920989e1df1f0e40126779d0255 (diff)
downloadlibkolab-libcalendaring.tar.gz
Make libcalendaring an optionlibcalendaring
-rw-r--r--CMakeLists.txt43
1 files changed, 24 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 67ac3a5..af4d2a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,7 @@ cmake_minimum_required(VERSION 2.6.4)
option( BUILD_TESTS "Build the tests" TRUE )
option( PYTHON_BINDINGS "Build bindings for python" FALSE )
+option( USE_LIBCALENDARING "Use libcalendaring" FALSE )
set(Libkolab_MODULE_DIR ${Libkolab_SOURCE_DIR}/cmake/modules)
set(CMAKE_MODULE_PATH ${Libkolab_MODULE_DIR})
@@ -45,9 +46,10 @@ set(CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/Libkolab )
find_package(Libkolabxml 0.7 REQUIRED)
find_package(Qt4 4.6.0 REQUIRED)
find_package(Libcalendaring)
-
-# find_package(KDE4 4.8 REQUIRED)
-# find_package(KdepimLibs 4.8 REQUIRED)
+if (NOT USE_LIBCALENDARING)
+ find_package(KDE4 4.8 REQUIRED)
+ find_package(KdepimLibs 4.8 REQUIRED)
+endif()
# add_definitions(-DKDEPIMLIBS_VERSION=0x${KdepimLibs_VERSION_MAJOR}0${KdepimLibs_VERSION_MINOR}${KDEPIMLIBS_VERSION_PATCH})
@@ -59,22 +61,25 @@ endif()
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS} -fPIC -g" )
-# set( KDE_INCLUDES ${KDEPIMLIBS_INCLUDE_DIRS} ${KDE4_INCLUDE_DIR})
-# set( KDE_LIBRARIES
-# ${KDEPIMLIBS_KCALCORE_LIBS}
-# ${KDEPIMLIBS_KABC_LIBS}
-# ${KDEPIMLIBS_KMIME_LIBS}
-# ${KDEPIMLIBS_AKONADI_LIBS}
-# ${KDEPIMLIBS_AKONADI_NOTES_LIBS}
-# ${KDEPIMLIBS_KCALUTILS_LIBS}
-# ${KDEPIMLIBS_KPIMUTILS_LIBS}
-# ${KDE4_KDECORE_LIBRARY}
-# ${KDE4_KIO_LIBRARY}
-# )
-set( KDE_INCLUDES ${Libcalendaring_INCLUDE_DIRS} )
-set( KDE_LIBRARIES ${Libcalendaring_LIBRARIES} )
-
-message("${Libcalendaring_INCLUDE_DIRS} ${Libcalendaring_LIBRARIES}")
+if (USE_LIBCALENDARING)
+ set( KDE_INCLUDES ${Libcalendaring_INCLUDE_DIRS} )
+ set( KDE_LIBRARIES ${Libcalendaring_LIBRARIES} )
+ message("${Libcalendaring_INCLUDE_DIRS} ${Libcalendaring_LIBRARIES}")
+else()
+ set( KDE_INCLUDES ${KDEPIMLIBS_INCLUDE_DIRS} ${KDE4_INCLUDE_DIR})
+ set( KDE_LIBRARIES
+ ${KDEPIMLIBS_KCALCORE_LIBS}
+ ${KDEPIMLIBS_KABC_LIBS}
+ ${KDEPIMLIBS_KMIME_LIBS}
+ ${KDEPIMLIBS_AKONADI_LIBS}
+ ${KDEPIMLIBS_AKONADI_NOTES_LIBS}
+ ${KDEPIMLIBS_KCALUTILS_LIBS}
+ ${KDEPIMLIBS_KPIMUTILS_LIBS}
+ ${KDE4_KDECORE_LIBRARY}
+ ${KDE4_KIO_LIBRARY}
+ )
+endif()
+
include_directories(
${QT_INCLUDES}