3 # (c) Deloptes deloptes@yahoo.com
8 CMAKE_MINIMUM_REQUIRED( VERSION 2.4.4 )
9 PROJECT( top-level C CXX )
12 SET ( PROJECT_NAME akonadi_opensync_plugin )
14 # SET ( CMAKE_INSTALL_PREFIX "/opt/testing/opensync" )
16 SET( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules" )
17 # SET ( OpenSync_DIR "/opt/testing/opensync" )
18 #SET (PKG_CONFIG_PATH "/opt/testing/opensync/lib/pkgconfig" )
19 SET (PKG_CONFIG_PATH ${PKG_CONFIG_PATH} $ENV{PKG_CONFIG_PATH} )
20 SET( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS} )
21 # SET( CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -ggdb -g -O2 -Wall -W " ${CMAKE_CXX_FLAGS_DEBUG} ${KDE4_ENABLE_EXCEPTIONS} )
23 #ADD_DEFINITIONS(-g -O2 -fsigned-char -freg-struct-return -Wall -W -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Winline -Werror)
24 # ADD_DEFINITIONS( -DDEBUG -g -O2 -Wall -W -fexceptions)
26 ADD_DEFINITIONS( -ggdb -O2 -Wall -W -fexceptions)
28 FIND_PACKAGE( KdepimLibs REQUIRED )
29 FIND_PACKAGE( Akonadi REQUIRED )
30 FIND_PACKAGE( GLIB2 REQUIRED )
31 FIND_PACKAGE( KDE4 REQUIRED )
32 FIND_PACKAGE( OpenSync REQUIRED )
33 FIND_PACKAGE( Automoc4 REQUIRED )
35 INCLUDE( CheckIncludeFile )
37 INCLUDE( Documentation )
38 INCLUDE( OpenSyncDefaults )
39 INCLUDE ( OpenSyncPlugin )
40 INCLUDE( OpenSyncInternal )
41 INCLUDE( OpenSyncPackaging )
46 # include_directories( ${KDE4_INCLUDES} "/opt/testing/opensync/include" )
48 # include_directories( ${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${KDEPIMLIBS_INCLUDE_DIR} ${OPENSYNC_INCLUDE_DIR} "/opt/testing/opensync/include" )
49 include_directories( ${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${KDEPIMLIBS_INCLUDE_DIR} ${OPENSYNC_INCLUDE_DIR} ${OPENSYNC_INCLUDE_DIR}/helper ${OPENSYNC_INCLUDE_DIR}/plugin )
51 include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src )
53 # include_directories( )
55 # link_directories( ${KDE4_LIB_DIR} ${KDEPIMLIBS_LIB_DIR} ${OPENSYNC_LIBRARIES_DIR} "/opt/testing/opensync/lib" )
56 link_directories( ${KDE4_LIB_DIR} ${KDEPIMLIBS_LIB_DIR} ${OPENSYNC_LIBRARIES_DIR} )
59 ADD_SUBDIRECTORY( src )
62 OPENSYNC_PACKAGE( ${PROJECT_NAME} ${VERSION} )