~unity8-desktop-session-team/indicator-session/indicator-session-using-upstart

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Charles Kerr
  • Date: 2013-07-02 00:26:11 UTC
  • mto: This revision was merged to the branch mainline in revision 399.
  • Revision ID: charles.kerr@canonical.com-20130702002611-lhtxz8ouz9uc2ldx
in cmake/Translations.cmake, use the GNUInstallDirs variables

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
set (PROJECT_VERSION "13.10.1")
7
7
set (PACKAGE ${CMAKE_PROJECT_NAME})
8
 
set (GETTEXT_PACKAGE indicator-session)
 
8
set (GETTEXT_PACKAGE ${CMAKE_PROJECT_NAME})
9
9
 
10
10
option (enable_tests "Build the package's automatic tests." ON)
 
11
option (full_warnings "Full compiler warnings." ON)
11
12
option (enable_lcov "Generate lcov code coverage reports." ON)
12
13
 
13
 
##
14
 
##  GNU standard installation directories
15
 
## 
 
14
find_package(PkgConfig REQUIRED)
16
15
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
 
##
26
 
##  Check for prerequisites
27
 
##
28
 
find_package (PkgConfig REQUIRED)
29
16
include (FindPkgConfig)
 
17
include (GdbusCodegen)
 
18
include (UseGSettings)
 
19
 
 
20
add_definitions( -DGETTEXT_PACKAGE="${GETTEXT_PACKAGE}" )
 
21
add_definitions (-DGNOMELOCALEDIR=\"@CMAKE_INSTALL_PREFIX@/share/locale\")
 
22
 
30
23
pkg_check_modules (SERVICE REQUIRED
31
24
                   glib-2.0>=2.36
32
25
                   gio-unix-2.0>=2.36)
34
27
 
35
28
set (CC_WARNING_ARGS " -Wall -pedantic -Wextra -Wno-missing-field-initializers")
36
29
 
 
30
 
 
31
 
37
32
set (ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION})
38
33
add_custom_target (dist
39
34
                   COMMAND bzr export --root=${ARCHIVE_NAME} ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.gz
49
44
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/src)
50
45
include_directories (${CMAKE_CURRENT_BINARY_DIR}/src)
51
46
 
52
 
# testing & coverage
 
47
# Workaround for libexecdir on debian
 
48
if (EXISTS "/etc/debian_version") 
 
49
  set (CMAKE_INSTALL_LIBEXECDIR "${CMAKE_INSTALL_LIBDIR}")
 
50
  set (CMAKE_INSTALL_FULL_LIBEXECDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
 
51
endif ()
 
52
set (PROJECT_LIBEXECDIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${CMAKE_PROJECT_NAME}")
 
53
message (STATUS "${PROJECT_LIBEXECDIR} is the libexec install dir")
 
54
 
 
55
add_subdirectory (src)
 
56
add_subdirectory (data)
 
57
add_subdirectory (po)
 
58
 
53
59
if (${enable_tests})
54
60
  set (GTEST_SOURCE_DIR /usr/src/gtest/src)
55
61
  set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..)
56
62
  set (GTEST_LIBS -lpthread)
57
63
  enable_testing ()
58
64
  if (${enable_lcov})
59
 
    include(GCov)
 
65
    include(cmake/GCov.cmake)
60
66
  endif ()
61
 
endif ()
62
 
 
63
 
add_subdirectory (src)
64
 
add_subdirectory (data)
65
 
add_subdirectory (po)
66
 
if (${enable_tests})
67
 
  add_subdirectory (tests)
 
67
  add_subdirectory(tests)
68
68
endif ()