~voldyman/pantheon-terminal/open-link-menu

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Mario Guerriero
  • Date: 2011-12-05 20:27:31 UTC
  • Revision ID: mefrio.g@gmail.com-20111205202731-v6d3hi3ey0lvfmvx
fixed cmake configu file and added the support to gettext

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
project (pantheon-terminal)
4
4
cmake_minimum_required (VERSION 2.8)
5
 
 
 
5
cmake_policy (VERSION 2.6)
6
6
 
7
7
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/vala)
8
8
 
9
9
#
10
10
# Base bits
11
11
#
 
12
 
 
13
enable_testing ()
 
14
 
12
15
set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
13
16
set (PKGDATADIR "${DATADIR}/pantheon-terminal")
14
17
set (GETTEXT_PACKAGE "pantheon-terminal")
15
18
set (RELEASE_NAME "Fast and connected.")
16
19
set (VERSION "0.1")
17
20
set (VERSION_INFO "Release")
 
21
set (CMAKE_C_FLAGS "-ggdb")
 
22
set (PREFIX ${CMAKE_INSTALL_PREFIX})
 
23
set (DOLLAR "$")
18
24
 
19
25
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
20
26
 
21
 
#
22
 
# Niceties
23
 
#
24
 
set (ARCHIVE_NAME pantheon-terminal-${VERSION})
25
 
add_custom_target (dist
26
 
    COMMAND bzr export --root=${ARCHIVE_NAME} ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
27
 
    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
28
 
    )
29
 
 
30
 
add_custom_target (distcheck
31
 
    COMMAND cd ${CMAKE_BINARY_DIR}
32
 
    && rm -rf ${ARCHIVE_NAME}
33
 
    && tar xf ${ARCHIVE_NAME}.tar.bz2
34
 
    && mkdir ${ARCHIVE_NAME}/build
35
 
    && cd ${ARCHIVE_NAME}/build
36
 
    && cmake -DCMAKE_INSTALL_PREFIX=../install -DGSETTINGS_LOCALINSTALL=ON .. -DCMAKE_MODULE_PATH=/usr/share/cmake
37
 
    && make -j8
38
 
    && make -j8 install
39
 
    && make check
40
 
    )
41
 
add_dependencies(distcheck dist)
42
 
 
43
 
add_custom_target (uninstall "${CMAKE_COMMAND}" -P
44
 
  "${CMAKE_SOURCE_DIR}/cmake/uninstall.cmake")
45
 
 
46
 
#
47
 
# config.h
48
 
#
49
27
configure_file (${CMAKE_SOURCE_DIR}/src/config.vala.cmake ${CMAKE_SOURCE_DIR}/src/config.vala)
50
28
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
51
29
 
77
55
    --vapidir=${CMAKE_CURRENT_SOURCE_DIR}/vapi/
78
56
    )
79
57
 
80
 
add_definitions(${CFLAGS} -Wall -Winit-self -Wwrite-strings -Wunreachable-code -Wstrict-prototypes )
 
58
add_subdirectory (po)
 
59
 
 
60
#add_definitions(${CFLAGS} -Wall -Winit-self -Wwrite-strings -Wunreachable-code -Wstrict-prototypes )
81
61
add_executable(pantheon-terminal ${VALA_C})
82
62
 
83
63
install(TARGETS pantheon-terminal RUNTIME DESTINATION bin)