Merge lp:~nik90/ubuntu-clock-app/intltool-required into lp:ubuntu-clock-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: David Planella
Approved revision: 128
Merged at revision: 127
Proposed branch: lp:~nik90/ubuntu-clock-app/intltool-required
Merge into: lp:ubuntu-clock-app
Diff against target: 19 lines (+8/-0)
1 file modified
CMakeLists.txt (+8/-0)
To merge this branch: bzr merge lp:~nik90/ubuntu-clock-app/intltool-required
Reviewer Review Type Date Requested Status
David Planella Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+236225@code.launchpad.net

Commit message

Make missing intltool a fatal configuration error.

Description of the change

When a developer doesn't have the intltool package installed, the cmake configurations fails silently showing a cryptic message [CMakeFiles/ubuntu-clock-app.desktop] Error 127. I noticed a MP by Michael Sawiq at https://code.launchpad.net/~saviq/webbrowser-app/intltool-required/+merge/233531 where the intltool is necessary for the cmake build to succeed and if not show a proper error message.

This MP mimics that.

To post a comment you must log in.
128. By Nekhelesh Ramananthan

Typo fix

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
David Planella (dpm) wrote :

Looks good to me, thanks!

Unrelated to this merge, I think in the long run we should create a .cmake module that we can just drop into projects to make internationalization simpler. I've looked at existing Gettext.cmake modules around the net, but they seem quite complex and to do things that we don't need.

review: Approve
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Thanks for the approval. And yes I think a generic cmake module should be made to simplify this process and also make it uniform throughout the apps. I think we should improve the template of the pot file though since at the moment there are some fields like,

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Canonical Ltd.
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-09-26 16:24:55 +0000
3+++ CMakeLists.txt 2014-09-27 10:37:07 +0000
4@@ -1,7 +1,15 @@
5 project(com.ubuntu.clock C CXX)
6 cmake_minimum_required(VERSION 2.8.9)
7+
8 find_program(INTLTOOL_MERGE intltool-merge)
9+if(NOT INTLTOOL_MERGE)
10+ message(FATAL_ERROR "Could not find intltool-merge, please install the intltool package")
11+endif()
12+
13 find_program(INTLTOOL_EXTRACT intltool-extract)
14+if(NOT INTLTOOL_EXTRACT)
15+ message(FATAL_ERROR "Could not find intltool-extract, please install the intltool package")
16+endif()
17
18 set (UBUNTU_MANIFEST_PATH "manifest.json.in" CACHE INTERNAL "Relative path to the manifest file")
19 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra")

Subscribers

People subscribed via source and target branches