~ubuntu-branches/ubuntu/saucy/indicator-location/saucy-proposed

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Charles Kerr, Ubuntu daily release
  • Date: 2013-08-27 14:09:18 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130827140918-wqjrzfbu54y6o2dv
Tags: 13.10.0+13.10.20130827.3-0ubuntu1
[ Charles Kerr ]
[ Charles Kerr]
* Implement the phone's location indicator
* Switch build system from autotools to cmake

[ Ubuntu daily release ]
* Automatic snapshot from revision 40

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
project (indicator-location)
 
2
cmake_minimum_required (VERSION 2.8.9)
 
3
 
 
4
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
 
5
 
 
6
set (PROJECT_VERSION "13.10.0")
 
7
set (PACKAGE ${CMAKE_PROJECT_NAME})
 
8
set (GETTEXT_PACKAGE ${CMAKE_PROJECT_NAME})
 
9
 
 
10
option (enable_tests "Build the package's automatic tests." ON)
 
11
option (enable_lcov "Generate lcov code coverage reports." ON)
 
12
 
 
13
##
 
14
##  GNU standard paths
 
15
## 
 
16
include (GNUInstallDirs)
 
17
if (EXISTS "/etc/debian_version") # Workaround for libexecdir on debian
 
18
  set (CMAKE_INSTALL_LIBEXECDIR "${CMAKE_INSTALL_LIBDIR}")
 
19
  set (CMAKE_INSTALL_FULL_LIBEXECDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
 
20
endif ()
 
21
set (CMAKE_INSTALL_PKGLIBEXECDIR "${CMAKE_INSTALL_LIBEXECDIR}/${CMAKE_PROJECT_NAME}")
 
22
set (CMAKE_INSTALL_FULL_PKGLIBEXECDIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${CMAKE_PROJECT_NAME}")
 
23
 
 
24
##
 
25
##  Check for prerequisites
 
26
##
 
27
 
 
28
find_package (PkgConfig REQUIRED)
 
29
 
 
30
include (FindPkgConfig)
 
31
pkg_check_modules (SERVICE REQUIRED
 
32
                   url-dispatcher-1
 
33
                   gio-unix-2.0>=2.36
 
34
                   glib-2.0>=2.36)
 
35
                   #ubuntu-platform-api>=1.0.0
 
36
 
 
37
##
 
38
##
 
39
##
 
40
 
 
41
set (CMAKE_INCLUDE_CURRENT_DIR ON)
 
42
set (CC_WARNING_ARGS " -Wall -Wextra -Wno-missing-field-initializers")
 
43
 
 
44
# testing & coverage
 
45
if (${enable_tests})
 
46
  set (GTEST_SOURCE_DIR /usr/src/gtest/src)
 
47
  set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..)
 
48
  set (GTEST_LIBS -lpthread)
 
49
  enable_testing ()
 
50
  if (${enable_lcov})
 
51
    include(GCov)
 
52
  endif ()
 
53
endif ()
 
54
 
 
55
add_subdirectory (src)
 
56
add_subdirectory (data)
 
57
add_subdirectory (po)
 
58
if (${enable_tests})
 
59
  add_subdirectory (tests)
 
60
endif ()