use system palete colors
[makneto-zunavac1.git] / src / ui-mobile / CMakeLists.txt
blob3e870c61e4f14e7033ff0cc97b9b3c0e4d02b5f2
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
62   wheelarea.cpp
63   view-graber.cpp
65 # enable warnings
66 ADD_DEFINITIONS( -Wall )
68 QT4_AUTOMOC(${makneto_mobile_SRCS})
70 QT4_ADD_RESOURCES(makneto_mobile_RESOURCES 
71         resources.qrc
72         )
74 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS}")
76 add_executable (makneto-mobile
77                                 ${makneto_mobile_RESOURCES}
78                                 ${makneto_mobile_SRCS})
80 SET_TARGET_PROPERTIES(makneto-mobile PROPERTIES COMPILE_FLAGS "-g")
82 target_link_libraries(  makneto-mobile
83                                                 ${QT_LIBRARIES} 
84                                                 ${QT_QTDECLARATIVE_LIBRARY}
85                                                 ${QT_QTWEBKIT_LIBRARY}
86                                                 ${TELEPATHY_QT4_FARSIGHT_LIBRARIES}
87                                                 ${TPFARSIGHT_LIBRARIES} 
88                                                 ${FARSIGHT2_LIBRARIES} 
89                                                 ${QTGSTREAMER_UI_LIBRARIES}
90             ${GSTREAMER_LIBRARY}
91             ${GLIB2_LIBRARIES}
92                                                 ${TELEPATHY_QT4_LIBRARIES}
93             ${QT_MOBILITY_LIBRARY}
94             ${QMLSINK_LIBRARIES}
95             ${QT_MOBILITY_MULTIMEDIAKIT_LIBRARY} ## MultimediaKit have to be after QmlSink!
96                                                 makneto
97                                                 libnotify-qt
98                                                 )
100 # enable warnings
101 ADD_DEFINITIONS( -Wall )
103 # Make sure the linker can find the makneto library once it is built. 
104 link_directories (${makneto_BINARY_DIR})
106 ## for debug
107 # message(SYSTEM " QT_LIBRARIES ${QT_LIBRARIES}")
108 # message(SYSTEM " makneto... ${makneto}")
109 # message(SYSTEM " makneto_BINARY_DIR ${makneto_BINARY_DIR}")
110 # message(SYSTEM " BIN INSTALL DIR ${BIN_INSTALL_DIR}")
112 install(TARGETS makneto-mobile
113                 RUNTIME DESTINATION bin COMPONENT applications
114                 LIBRARY DESTINATION lib COMPONENT libraries
115                 ARCHIVE DESTINATION lib/static COMPONENT libraries
116                 )
117                                                 
118 INSTALL(FILES makneto-mobile.desktop DESTINATION share/applications)
119 INSTALL(FILES makneto.png DESTINATION share/icons)
120     
121 INSTALL(FILES sounds/telephonebeep.mp3 DESTINATION share/sounds/makneto)
122 INSTALL(FILES sounds/telephonering.mp3 DESTINATION share/sounds/makneto)
123 INSTALL(FILES sounds/telephonedialing.mp3 DESTINATION share/sounds/makneto)
125 message(SYSTEM " DATA INSTALL DIR ${DATA_INSTALL_DIR}")