create PresenceManager that manage global presence state and message
[makneto-zunavac1.git] / src / ui-mobile / CMakeLists.txt
blob8ff0425979bd879bb7a5f9e306dcaf0101eee915
1 cmake_minimum_required(VERSION 2.6)
3 project(makneto-mobile)
5 SET(CMAKE_BUILD_TYPE Debug)
7 list(APPEND CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}/CMakeMod")
8 list(APPEND CMAKE_MODULE_PATH "../../CMakeMod")
10 add_definitions(-DGST_DISABLE_XML -DGST_DISABLE_LOADSAVE)
12 find_package(Qt4 COMPONENTS QtGui QtCore QtWebKit QtDeclarative REQUIRED)
13 find_package(QtDeclarative REQUIRED) # FIXME: it is needed?
14 find_package(QtMobility COMPONENTS multimedia REQUIRED)
15 #find_package(QmlDesktopComponents REQUIRED)
16 find_package(QtGStreamer REQUIRED)
17 find_package(TelepathyQt4 REQUIRED)
18 find_package(TelepathyQt4Farsight REQUIRED)
19 find_package(TpFarsight REQUIRED)
20 find_package(Farsight2 REQUIRED)
21 find_package(GStreamer REQUIRED) 
22 find_package(GStreamer COMPONENTS base REQUIRED) 
23 find_package(QtGstQmlSink REQUIRED)
24 find_package(GLIB2 REQUIRED) 
25 #find_package(GStreamer-Plugins-Base REQUIRED)
26 #check_package(GSTREAMER 1)
28 include(${QT_USE_FILE})
30 message(STATUS "Module path: ${CMAKE_MODULE_PATH}")
32 include_directories(${QT_INCLUDES} 
33                                         ${QT_QTDECLARATIVE_INCLUDE_DIR}
34                                         ${QT_QTWEBKIT_INCLUDE_DIR}
35                                         ${TELEPATHY_QT4_INCLUDE_DIR}
36                                         ${TPFARSIGHT_INCLUDE_DIR}
37                                         ${QTGSTREAMER_INCLUDE_DIR}
38           ${GSTREAMER_INCLUDE_DIR}
39           ${GSTREAMER_BASE_INCLUDE_DIR}
40           ${GLIB2_INCLUDE_DIR}
41           ${GLIB2_INTERNAL_INCLUDE_DIR}
42           ${QT_MOBILITY_INCLUDE_DIR}
43           ${QT_MOBILITY_MULTIMEDIAKIT_INCLUDE_DIR}
44                                         ${makneto_SOURCE_DIR}
45                                         ${CMAKE_CURRENT_BINARY_DIR} # for moc files generated by macro QT4_AUTOMOC
48 set(makneto_mobile_SRCS 
49         main.cpp
50   makneto.cpp
51   contacts-model-proxy.cpp
52   contacts-sort-filter-model-proxy.cpp
53   telepathytypes.cpp
54   session-model.cpp
55   session-model-item.cpp
56   main-window.cpp
57   notifications-model.cpp
58   notification-item.cpp
59   mobile-gst-element-factory.cpp
60   sound-notificator.cpp
61   presence-manager.cpp
63 # enable warnings
64 ADD_DEFINITIONS( -Wall )
66 QT4_AUTOMOC(${makneto_mobile_SRCS})
68 QT4_ADD_RESOURCES(makneto_mobile_RESOURCES 
69         resources.qrc
70         )
72 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}")
74 add_executable (makneto-mobile
75                                 ${makneto_mobile_RESOURCES}
76                                 ${makneto_mobile_SRCS})
78 SET_TARGET_PROPERTIES(makneto-mobile PROPERTIES COMPILE_FLAGS "-g")
80 target_link_libraries(  makneto-mobile
81                                                 ${QT_LIBRARIES} 
82                                                 ${QT_QTDECLARATIVE_LIBRARY}
83                                                 ${QT_QTWEBKIT_LIBRARY}
84                                                 ${TELEPATHY_QT4_FARSIGHT_LIBRARIES}
85                                                 ${TPFARSIGHT_LIBRARIES} 
86                                                 ${FARSIGHT2_LIBRARIES} 
87                                                 ${QTGSTREAMER_UI_LIBRARIES}
88             ${GSTREAMER_LIBRARY}
89             ${GLIB2_LIBRARIES}
90                                                 ${TELEPATHY_QT4_LIBRARIES}
91             ${QT_MOBILITY_LIBRARY}
92             ${QT_MOBILITY_MULTIMEDIAKIT_LIBRARY}
93             ${QMLSINK_LIBRARIES}
94                                                 makneto
95                                                 libnotify-qt
96                                                 )
98 # enable warnings
99 ADD_DEFINITIONS( -Wall )
101 # Make sure the linker can find the makneto library once it is built. 
102 link_directories (${makneto_BINARY_DIR})
104 ## for debug
105 # message(SYSTEM " QT_LIBRARIES ${QT_LIBRARIES}")
106 # message(SYSTEM " makneto... ${makneto}")
107 # message(SYSTEM " makneto_BINARY_DIR ${makneto_BINARY_DIR}")
108 # message(SYSTEM " BIN INSTALL DIR ${BIN_INSTALL_DIR}")
110 install(TARGETS makneto-mobile
111                 RUNTIME DESTINATION bin COMPONENT applications
112                 LIBRARY DESTINATION lib COMPONENT libraries
113                 ARCHIVE DESTINATION lib/static COMPONENT libraries
114                 )
115                                                 
116 INSTALL(FILES makneto-mobile.desktop DESTINATION share/applications)
117 INSTALL(FILES makneto.png DESTINATION share/icons)
118     
119 INSTALL(FILES sounds/telephonebeep.mp3 DESTINATION share/sounds/makneto)
120 INSTALL(FILES sounds/telephonering.mp3 DESTINATION share/sounds/makneto)
122 message(SYSTEM " DATA INSTALL DIR ${DATA_INSTALL_DIR}")