~artmello/messaging-app/messaging-app-snap

« back to all changes in this revision

Viewing changes to src/CMakeLists.txt

  • Committer: Tiago Salem Herrmann
  • Date: 2013-07-15 20:33:33 UTC
  • Revision ID: tiago.herrmann@canonical.com-20130715203333-5ei33sqegv7yxmwc
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
set(MESSAGING_APP messaging-app)
 
2
 
 
3
set(messaging_app_HDRS
 
4
    messagingapplication.h
 
5
    messagingappdbus.h)
 
6
 
 
7
set(messaging_app_SRCS
 
8
    messagingapplication.cpp
 
9
    messagingappdbus.cpp
 
10
    main.cpp)
 
11
 
 
12
qt5_add_dbus_adaptor(messaging_app_SRCS MessagingApp.xml messagingappdbus.h MessagingAppDBus)
 
13
add_executable(${MESSAGING_APP}
 
14
    ${messaging_app_SRCS}
 
15
    )
 
16
qt5_use_modules(${MESSAGING_APP} Core DBus Gui Qml Quick)
 
17
 
 
18
include_directories(
 
19
    ${CMAKE_CURRENT_BINARY_DIR}
 
20
    ${CMAKE_CURRENT_SOURCE_DIR}
 
21
    )
 
22
 
 
23
install(TARGETS ${MESSAGING_APP}
 
24
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
 
25
    )
 
26
 
 
27
 
 
28
configure_file(com.canonical.MessagingApp.service.in com.canonical.MessagingApp.service)
 
29
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/com.canonical.MessagingApp.service DESTINATION share/dbus-1/services)
 
30
 
 
31
# Handle i18n in the desktop file
 
32
set(DESKTOP_FILE ${MESSAGING_APP}.desktop)
 
33
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE})
 
34
file(STRINGS ${DESKTOP_FILE}.in DESKTOP_FILE_CONTENTS)
 
35
foreach(LINE ${DESKTOP_FILE_CONTENTS})
 
36
    string(REGEX REPLACE "tr\\\(\"(.*)\"\\\)" "\\1" LINE "${LINE}")
 
37
    file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE} "${LINE}\n")
 
38
endforeach(LINE)
 
39
 
 
40
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE}
 
41
    DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
 
42
    )
 
43
 
 
44
add_subdirectory(qml)