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}
41 ${GLIB2_INTERNAL_INCLUDE_DIR}
42 ${QT_MOBILITY_INCLUDE_DIR}
43 ${QT_MOBILITY_MULTIMEDIAKIT_INCLUDE_DIR}
45 ${CMAKE_CURRENT_BINARY_DIR} # for moc files generated by macro QT4_AUTOMOC
48 set(makneto_mobile_SRCS
51 contacts-model-proxy.cpp
52 contacts-sort-filter-model-proxy.cpp
55 session-model-item.cpp
57 notifications-model.cpp
59 mobile-gst-element-factory.cpp
66 ADD_DEFINITIONS( -Wall )
68 QT4_AUTOMOC(${makneto_mobile_SRCS})
70 QT4_ADD_RESOURCES(makneto_mobile_RESOURCES
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
84 ${QT_QTDECLARATIVE_LIBRARY}
85 ${QT_QTWEBKIT_LIBRARY}
86 ${TELEPATHY_QT4_FARSIGHT_LIBRARIES}
87 ${TPFARSIGHT_LIBRARIES}
88 ${FARSIGHT2_LIBRARIES}
89 ${QTGSTREAMER_UI_LIBRARIES}
92 ${TELEPATHY_QT4_LIBRARIES}
93 ${QT_MOBILITY_LIBRARY}
95 ${QT_MOBILITY_MULTIMEDIAKIT_LIBRARY} ## MultimediaKit have to be after QmlSink!
101 ADD_DEFINITIONS( -Wall )
103 # Make sure the linker can find the makneto library once it is built.
104 link_directories (${makneto_BINARY_DIR})
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
118 INSTALL(FILES makneto-mobile.desktop DESTINATION share/applications)
119 INSTALL(FILES makneto.png DESTINATION share/icons)
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}")