summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2012-06-27 08:20:44 (GMT)
committerChristian Mollekopf <chrigi_1@fastmail.fm>2012-06-27 08:20:44 (GMT)
commitf487d6072aaff084fa80122789752e89d3260094 (patch)
treef82c2a6a6b1c7593f6bb7c370a813ae75360eaae
parentf8dd006d04b994b2b5719d56a2816f39386911ee (diff)
downloadlibcalendaring-f487d6072aaff084fa80122789752e89d3260094.tar.gz
kmime compiles
-rw-r--r--kmime/CMakeLists.txt36
1 files changed, 31 insertions, 5 deletions
diff --git a/kmime/CMakeLists.txt b/kmime/CMakeLists.txt
index 4bb9f8a..2b3b144 100644
--- a/kmime/CMakeLists.txt
+++ b/kmime/CMakeLists.txt
@@ -1,7 +1,33 @@
-add_subdirectory( tests )
+project(kmime)
+
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
+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)
+
+
+include_directories( ../kdecore )
+
+# add_subdirectory( tests )
add_definitions( -DKDE_DEFAULT_DEBUG_AREA=5320 -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII )
include(CheckTimezone)
configure_file (config-kmime.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kmime.h)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" )
########### next target ###############
@@ -28,13 +54,13 @@ set(kmime_LIB_SRCS
kautodeletehash.cpp )
-kde4_add_library(kmime ${LIBRARY_TYPE} ${kmime_LIB_SRCS})
+add_library(calendaring-kmime ${LIBRARY_TYPE} ${kmime_LIB_SRCS})
-target_link_libraries(kmime ${KDE4_KDECORE_LIBS} )
+target_link_libraries(calendaring-kmime calendaring-kdecore )
-set_target_properties(kmime PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
+set_target_properties(calendaring-kmime PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
-install(TARGETS kmime EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
+install(TARGETS calendaring-kmime EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
install( FILES
boolflags.h