~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 02:00:17 UTC
  • mto: This revision was merged to the branch mainline in revision 399.
  • Revision ID: charles.kerr@canonical.com-20130702020017-h5isb2qregvdrp8j
in cmake files, limit scopes by moving single-target properties out of the global variables to single-target ones and moving single-use includes into the directories where they're used

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
option (enable_tests "Build the package's automatic tests." ON)
11
11
option (enable_lcov "Generate lcov code coverage reports." ON)
12
12
 
13
 
find_package(PkgConfig REQUIRED)
 
13
##
 
14
##  GNU standard installation directories
 
15
## 
14
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
##
 
26
##  Check for prerequisites
 
27
##
 
28
find_package (PkgConfig REQUIRED)
15
29
include (FindPkgConfig)
16
 
include (GdbusCodegen)
17
 
include (UseGSettings)
18
 
 
19
 
add_definitions( -DGETTEXT_PACKAGE="${GETTEXT_PACKAGE}" )
20
 
add_definitions (-DGNOMELOCALEDIR=\"@CMAKE_INSTALL_PREFIX@/share/locale\")
21
 
 
22
30
pkg_check_modules (SERVICE REQUIRED
23
31
                   glib-2.0>=2.36
24
32
                   gio-unix-2.0>=2.36)
26
34
 
27
35
set (CC_WARNING_ARGS " -Wall -pedantic -Wextra -Wno-missing-field-initializers")
28
36
 
29
 
 
30
 
 
31
37
set (ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION})
32
38
add_custom_target (dist
33
39
                   COMMAND bzr export --root=${ARCHIVE_NAME} ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.gz
43
49
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/src)
44
50
include_directories (${CMAKE_CURRENT_BINARY_DIR}/src)
45
51
 
46
 
# Workaround for libexecdir on debian
47
 
if (EXISTS "/etc/debian_version") 
48
 
  set (CMAKE_INSTALL_LIBEXECDIR "${CMAKE_INSTALL_LIBDIR}")
49
 
  set (CMAKE_INSTALL_FULL_LIBEXECDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
50
 
endif ()
51
 
 
52
 
set (CMAKE_INSTALL_PKGLIBEXECDIR "${CMAKE_INSTALL_LIBEXECDIR}/${CMAKE_PROJECT_NAME}")
53
 
set (CMAKE_INSTALL_FULL_PKGLIBEXECDIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${CMAKE_PROJECT_NAME}")
54
52
 
55
53
add_subdirectory (src)
56
54
add_subdirectory (data)