summaryrefslogtreecommitdiff
path: root/kabc/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'kabc/CMakeLists.txt')
-rw-r--r--kabc/CMakeLists.txt76
1 files changed, 49 insertions, 27 deletions
diff --git a/kabc/CMakeLists.txt b/kabc/CMakeLists.txt
index 387bdb1..9361330 100644
--- a/kabc/CMakeLists.txt
+++ b/kabc/CMakeLists.txt
@@ -1,7 +1,27 @@
project(kabc)
-include_directories( ${KDE4_KIO_INCLUDES} )
+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_directories( ${KDE4_KIO_INCLUDES} )
add_definitions(${QDBUS_DEFINITIONS} -DKDE_DEFAULT_DEBUG_AREA=5700)
add_definitions( -DQT_NO_CAST_FROM_ASCII )
@@ -23,8 +43,8 @@ set(vcards_STAT_SRCS
vcardparser/vcardparser.cpp
)
-add_subdirectory( vcardparser )
-add_subdirectory( tests )
+# add_subdirectory( vcardparser )
+# add_subdirectory( tests )
#add_subdirectory( scripts )
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripts)
@@ -54,45 +74,47 @@ set(kabc_LIB_SRCS
errorhandler.cpp
geo.cpp
key.cpp
- ldapdn.cpp
- ldif.cpp
+# ldapdn.cpp
+# ldif.cpp
phonenumber.cpp
picture.cpp
plugin.cpp
secrecy.cpp
sound.cpp
timezone.cpp
- ldifconverter.cpp
+# ldifconverter.cpp
addresseelist.cpp
vcardconverter.cpp
vcardtool.cpp
addresseehelper.cpp
- lock.cpp
- locknull.cpp
+# lock.cpp
+# locknull.cpp
sortmode.cpp
- vcarddrag.cpp
+# vcarddrag.cpp
${vcards_STAT_SRCS}
)
-if (NOT WINCE)
- set(kabc_LIB_SRCS
- ${kabc_LIB_SRCS}
- #disabled due to no QTreeWidget
- emailselectdialog.cpp
- )
-endif()
+QT4_AUTOMOC("${kabc_LIB_SRCS}")
+
+# if (NOT WINCE)
+# set(kabc_LIB_SRCS
+# ${kabc_LIB_SRCS}
+# #disabled due to no QTreeWidget
+# emailselectdialog.cpp
+# )
+# endif()
-kde4_add_library(kabc ${LIBRARY_TYPE} ${kabc_LIB_SRCS})
+add_library(calendaring-kabc ${LIBRARY_TYPE} ${kabc_LIB_SRCS})
-target_link_libraries(kabc ${KDE4_KDEUI_LIBS} ${KDE4_KDECORE_LIBS})
-target_link_libraries(kabc LINK_INTERFACE_LIBRARIES ${KDE4_KDEUI_LIBS})
+target_link_libraries(calendaring-kabc ${KDE4_KDEUI_LIBS} ${KDE4_KDECORE_LIBS})
+target_link_libraries(calendaring-kabc LINK_INTERFACE_LIBRARIES ${KDE4_KDEUI_LIBS})
-set_target_properties(kabc PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
-install(TARGETS kabc EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
+set_target_properties(calendaring-kabc PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
+install(TARGETS calendaring-kabc EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
-install( FILES countrytransl.map DESTINATION ${DATA_INSTALL_DIR}/kabc )
+# install( FILES countrytransl.map DESTINATION ${DATA_INSTALL_DIR}/kabc )
install( FILES
kabc_export.h
address.h
@@ -100,14 +122,14 @@ install( FILES
addresseelist.h
contactgroup.h
contactgrouptool.h
- emailselectdialog.h
+# emailselectdialog.h
errorhandler.h
field.h
geo.h
key.h
- ldifconverter.h
- lock.h
- locknull.h
+# ldifconverter.h
+# lock.h
+# locknull.h
phonenumber.h
picture.h
plugin.h
@@ -116,6 +138,6 @@ install( FILES
sound.h
timezone.h
vcardconverter.h
- vcarddrag.h
+# vcarddrag.h
DESTINATION ${INCLUDE_INSTALL_DIR}/kabc COMPONENT Devel
)