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
64 ADD_DEFINITIONS( -Wall )
66 QT4_AUTOMOC(${makneto_mobile_SRCS})
68 QT4_ADD_RESOURCES(makneto_mobile_RESOURCES
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
82 ${QT_QTDECLARATIVE_LIBRARY}
83 ${QT_QTWEBKIT_LIBRARY}
84 ${TELEPATHY_QT4_FARSIGHT_LIBRARIES}
85 ${TPFARSIGHT_LIBRARIES}
86 ${FARSIGHT2_LIBRARIES}
87 ${QTGSTREAMER_UI_LIBRARIES}
90 ${TELEPATHY_QT4_LIBRARIES}
91 ${QT_MOBILITY_LIBRARY}
92 ${QT_MOBILITY_MULTIMEDIAKIT_LIBRARY}
99 ADD_DEFINITIONS( -Wall )
101 # Make sure the linker can find the makneto library once it is built.
102 link_directories (${makneto_BINARY_DIR})
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
116 INSTALL(FILES makneto-mobile.desktop DESTINATION share/applications)
117 INSTALL(FILES makneto.png DESTINATION share/icons)
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}")