fix session id generator
[makneto-zunavac1.git] / src / backend / CMakeLists.txt
blob66bcd519e1dbd05353a6ebe639547b47c85837b7
1 cmake_minimum_required(VERSION 2.6)
3 project(makneto)
5 add_definitions( -DMAKNETO_LIB=1)
7 SET(CMAKE_BUILD_TYPE Debug)
9 list(APPEND CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}/CMakeMod")
10 list(APPEND CMAKE_MODULE_PATH "../../CMakeMod")
12 find_package(Qt4 REQUIRED)
13 find_package(QtGStreamer REQUIRED)
14 find_package(TelepathyQt4 REQUIRED)
15 find_package(TelepathyQt4Farsight REQUIRED)
16 find_package(TpFarsight REQUIRED)
17 find_package(Farsight2 REQUIRED)
19 include(${QT_USE_FILE})
21 message(STATUS "Module path: ${CMAKE_MODULE_PATH}")
23 include_directories(${QT_INCLUDES} 
24                                         ${TELEPATHY_QT4_INCLUDE_DIR}
25                                         ${TPFARSIGHT_INCLUDE_DIR}
26                                         ${QTGSTREAMER_INCLUDE_DIR}
27                                         ${CMAKE_CURRENT_BINARY_DIR} # for moc files generated by macro QT4_AUTOMOC
28                                         )
30 set(makneto_SRCS 
31         telepathy-initializer.cpp
32         telepathy-client.cpp
33         accounts-model.cpp
34         accounts-model-item.cpp
35         contact-model-item.cpp
36         flat-model-proxy.cpp
37         tree-node.cpp
38         session.cpp
39         #voip
40         voip/sleep.cpp
41         voip/callchannelhandler.cpp
42         voip/calllog.cpp
43         voip/callparticipant.cpp
44         voip/element-factory/deviceelementfactory.cpp
45         voip/element-factory/defaultelementfactory.cpp
46         )
48 # enable warnings
49 ADD_DEFINITIONS( -Wall )
51 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS} ")
53 QT4_AUTOMOC(${makneto_SRCS})
56 ADD_LIBRARY(makneto SHARED 
57                         ${makneto_SRCS}
58                         )
60 ## for debug
61 message(SYSTEM " CMAKE_HOME_DIRECTORY: ${CMAKE_HOME_DIRECTORY} ")
62 message(SYSTEM " CMAKE_CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}")
63 # message(SYSTEM "  _QTGSTREAMER_TARGETS_FILE: ${_QTGSTREAMER_TARGETS_FILE} ")
64 # message(SYSTEM "  QTGSTREAMER_FLAGS: ${QTGSTREAMER_FLAGS}")
65 # message(SYSTEM "  QTGSTREAMER_INCLUDE_DIR: ${QTGSTREAMER_INCLUDE_DIR}")
66 # message(SYSTEM "  QTGSTREAMER_LIBRARIES: ${QTGSTREAMER_LIBRARIES}")
67 # message(SYSTEM "  QT_LIBRARIES : ${QT_LIBRARIES}")
69 SET_TARGET_PROPERTIES(makneto PROPERTIES COMPILE_FLAGS "-g")
71 target_link_libraries(  makneto
72                                                 ${QT_LIBRARIES} 
73                                                 ${TELEPATHY_QT4_FARSIGHT_LIBRARIES}
74                                                 ${TPFARSIGHT_LIBRARIES} 
75                                                 ${FARSIGHT2_LIBRARIES} 
76                                                 ${QTGSTREAMER_LIBRARIES}
77                                                 ${QTGSTREAMER_UI_LIBRARIES}
78                                                 #${QCA2_LIBRARIES} 
79                                                 ${TELEPATHY_QT4_LIBRARIES}
80                                                 )
82 SET_TARGET_PROPERTIES(makneto PROPERTIES COMPILE_FLAGS "-g")
84 install(TARGETS makneto
85                 RUNTIME DESTINATION bin COMPONENT applications
86                 LIBRARY DESTINATION lib COMPONENT libraries
87                 ARCHIVE DESTINATION lib/static COMPONENT libraries
88 #    FILES telepathy-client.h DESTINATION include COMPONENT headers
89                 )