File: init.CMakeLists.txt

package info (click to toggle)
ibus-table-array30 1.2.0.20090729-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,980 kB
  • ctags: 34
  • sloc: ansic: 230; makefile: 7
file content (64 lines) | stat: -rw-r--r-- 1,737 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
####################################################################
# CMake init defintion.
#
# Definition that should run in front of everything else.
#
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
IF(COMMAND cmake_policy)
    cmake_policy(SET CMP0003 NEW)
    cmake_policy(SET CMP0005 OLD)
# CMAKE 2.6.3 and above have CMAKE_VERSION
    IF (CMAKE_VERSION)
        cmake_policy(SET CMP0011 OLD)
    ENDIF(CMAKE_VERSION)
ENDIF(COMMAND cmake_policy)

SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake_modules)
SET(ENV{LC_ALL} "C")
INCLUDE(BasicMacros)

###==================================================================
# Find parameters configuration
#
#  Note: CMake 2.4 does not support STRING(STRIP ..)

DATE_FORMAT(DATE "+%a %b %d %Y")
DATE_FORMAT(DATE_SHORT "+%Y%m%d")
#MESSAGE("DATE=${DATE}|")
#MESSAGE("DATE_SHORT=${DATE_SHORT}|")

###==================================================================
# Directories
#

ADD_DEFINITIONS(-DCMAKE_INSTALL_PREFIX='"${CMAKE_INSTALL_PREFIX}"')

IF(NOT DEFINED datadir)
    SET(datadir "${CMAKE_INSTALL_PREFIX}/share")
    ADD_DEFINITIONS(-DDATADIR='"${datadir}"')
ENDIF()

IF(NOT DEFINED docdir)
    SET(docdir "${datadir}/doc")
    ADD_DEFINITIONS(-DDOCDIR='"${docdir}"')
ENDIF()

IF(NOT DEFINED SYSCONF_INSTALL_DIR)
    SET(SYSCONF_INSTALL_DIR "/etc")
    ADD_DEFINITIONS(-DSYSCONFDIR='"${SYSCONF_INSTALL_DIR}"')
ENDIF()

IF(NOT DEFINED LIBEXEC_DIR)
    SET(LIBEXEC_DIR "${CMAKE_INSTALL_PREFIX}/libexec")
    ADD_DEFINITIONS(-DLIBEXEC_DIR='"${LIBEXEC_DIR}"')
ENDIF()


###==================================================================
# CPack Generator
# RPM and pack need them, so declare here.
#
SET(CPACK_GENERATOR "TGZ")
SET(CPACK_SOURCE_GENERATOR "TGZ")