~pkunal-parmar/ubuntu-calendar-app/ICalImport

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Tarmac
  • Author(s): David Planella
  • Date: 2014-06-08 06:56:39 UTC
  • mfrom: (301.1.3 ubuntu-calendar-app)
  • Revision ID: tarmac-20140608065639-m2z2il3pcnvme2hp
Added inline translations support in the desktop file, so that its translations are loaded in the click scope. Fixes: https://bugs.launchpad.net/bugs/1318008, https://bugs.launchpad.net/bugs/1325626.

Approved by Mihir Soni, Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
project(com.ubuntu.calendar)
2
2
cmake_minimum_required(VERSION 2.8.9)
 
3
find_program(INTLTOOL_MERGE intltool-merge)
 
4
find_program(INTLTOOL_EXTRACT intltool-extract)
3
5
 
4
6
# Standard install paths
5
7
include(GNUInstallDirs)
40
42
endif(CLICK_MODE)
41
43
 
42
44
file(GLOB_RECURSE I18N_SRC_FILES
43
 
     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
44
 
     rc/**.qml desktop/**.desktop.in)
 
45
     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/po
 
46
     *.qml *.js)
 
47
list(APPEND I18N_SRC_FILES ${DESKTOP_FILE}.in.in.h)
45
48
list(SORT I18N_SRC_FILES)
46
 
 
 
49
message("Found ${I18N_SRC_FILES}")
47
50
 
48
51
file(GLOB SRC_FILES
49
52
     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
50
53
     *.qml *.js *.png *.js *.svg)
51
54
install(FILES ${SRC_FILES} ${ICON_FILE} DESTINATION ${DATA_DIR})
52
55
 
53
 
configure_file(${DESKTOP_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE})
 
56
configure_file(${DESKTOP_FILE}.in.in ${DESKTOP_FILE}.in)
 
57
 
 
58
add_custom_target(${DESKTOP_FILE} ALL
 
59
  COMMENT "Merging translations into ${DESKTOP_FILE}"
 
60
  COMMAND LC_ALL=C ${INTLTOOL_MERGE} -d -u ${CMAKE_SOURCE_DIR}/po ${DESKTOP_FILE}.in ${DESKTOP_FILE} >/dev/null
 
61
)
 
62
 
54
63
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE} DESTINATION ${DESKTOP_DIR})
55
64
 
56
65
install(FILES ${URLS_FILE} DESTINATION ${URLS_DIR})