File: CMakeLists.txt

package info (click to toggle)
file-browser-applet 0.6.6-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 428 kB
  • ctags: 281
  • sloc: ansic: 2,740; makefile: 6
file content (119 lines) | stat: -rw-r--r-- 5,834 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
CMAKE_MINIMUM_REQUIRED (VERSION 2.4.7)

PROJECT (FILE_BROWSER_APPLET C)

# Compiler flags
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -g -Wall -ansi")
SET (EXEC file-browser-applet)

# Version
################################################################################
SET (VERSION_MAJOR 0)
SET (VERSION_MINOR 6)
SET (VERSION_PATCH 6)

# Install path options
################################################################################
IF (NOT DEFINED CMAKE_INSTALL_PREFIX)
    SET (CMAKE_INSTALL_PREFIX "/usr")
ENDIF (NOT DEFINED CMAKE_INSTALL_PREFIX)
MESSAGE (STATUS "Using CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
################################################################################
IF (NOT DEFINED CMAKE_INSTALL_LIB_PREFIX)
    SET (CMAKE_INSTALL_LIB_PREFIX "${CMAKE_INSTALL_PREFIX}/lib")
ENDIF (NOT DEFINED CMAKE_INSTALL_LIB_PREFIX)
MESSAGE (STATUS "Using CMAKE_INSTALL_LIB_PREFIX=${CMAKE_INSTALL_LIB_PREFIX}")
################################################################################
IF (NOT DEFINED CMAKE_INSTALL_LIB_EXEC_DIR)
    SET (CMAKE_INSTALL_LIB_EXEC_DIR "${CMAKE_INSTALL_LIB_PREFIX}/${EXEC}")
ENDIF (NOT DEFINED CMAKE_INSTALL_LIB_EXEC_DIR)
MESSAGE (STATUS "Using CMAKE_INSTALL_LIB_EXEC_DIR=${CMAKE_INSTALL_LIB_EXEC_DIR}")
################################################################################
IF (NOT DEFINED CMAKE_INSTALL_BONOBO_DIR)
    SET (CMAKE_INSTALL_BONOBO_DIR "${CMAKE_INSTALL_LIB_PREFIX}/bonobo/servers")
ENDIF (NOT DEFINED CMAKE_INSTALL_BONOBO_DIR)
MESSAGE (STATUS "Using CMAKE_INSTALL_BONOBO_DIR=${CMAKE_INSTALL_BONOBO_DIR}")
################################################################################
IF (NOT DEFINED CMAKE_INSTALL_GCONF_SCHEMA_DIR)
    SET(CMAKE_INSTALL_GCONF_SCHEMA_DIR "${CMAKE_INSTALL_PREFIX}/share/gconf/schemas")
ENDIF(NOT DEFINED CMAKE_INSTALL_GCONF_SCHEMA_DIR)
MESSAGE (STATUS "Using CMAKE_INSTALL_GCONF_SCHEMA_DIR=${CMAKE_INSTALL_GCONF_SCHEMA_DIR}")
################################################################################
IF (NOT DEFINED CMAKE_INSTALL_BUILDER_UI_DIR)
    SET(CMAKE_INSTALL_BUILDER_UI_DIR "${CMAKE_INSTALL_PREFIX}/share/${EXEC}/builder")
ENDIF(NOT DEFINED CMAKE_INSTALL_BUILDER_UI_DIR)
MESSAGE (STATUS "Using CMAKE_INSTALL_BUILDER_UI_DIR=${CMAKE_INSTALL_BUILDER_UI_DIR}\n")
################################################################################

# Compile time options
SET (ENABLE_CONTEXT_MENU TRUE)
#SET (ENABLE_HELP_DOC TRUE)

ADD_SUBDIRECTORY (data)
ADD_SUBDIRECTORY (pixmaps)
ADD_SUBDIRECTORY (src)

# Uninstall target
CONFIGURE_FILE ("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
                "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
                IMMEDIATE @ONLY)
ADD_CUSTOM_TARGET (uninstall
                   "${CMAKE_COMMAND}" -P 
                   "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")

# Target to generate a distribution-ready tarball
SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY "File Browser Applet")
SET (CPACK_PACKAGE_VENDOR "Axel von Bertoldi")
SET (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
SET (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
SET (CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
SET (CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
SET (CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
SET (CPACK_GENERATOR TGZ)
SET (CPACK_SOURCE_PACKAGE_FILE_NAME
    "${EXEC}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
SET (CPACK_SOURCE_GENERATOR TGZ)
SET (CPACK_SOURCE_IGNORE_FILES
     "GNOME_FileBrowserApplet_Factory.server$"
     "config.h$"
     ".svn"
     "build"
     "doc"
     "po")
INCLUDE (CPack)

ADD_CUSTOM_TARGET (deb checkinstall -D --pkgname="${EXEC}"
                                       --pkgversion="${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}"
                                       --install=0
                                       --deldoc=1
                                       --backup=0
                                       --pkglicense="GPLv2"
                                       --maintainer="bertoldia@gmail.com"
                                       --pkggroup="GNOME Desktop Environment"
                                       --requires="libpanel-applet2-0")

ADD_CUSTOM_TARGET (really-clean rm -fr CMakeCache.txt
                                       cmake_install.cmake
                                       ${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz
                                       *.deb
                                       CPackConfig.cmake
                                       cmake_uninstall.cmake
                                       CMakeFiles
                                       CPackSourceConfig.cmake
                                       install_manifest.txt
                                       Makefile
                                       _CPack_Packages
                                       pixmaps/CMakeFiles
                                       pixmaps/cmake_install.cmake
                                       pixmaps/Makefile
                                       src/${EXEC}
                                       src/cmake_install.cmake
                                       src/config.h
                                       src/CMakeFiles
                                       src/Makefile
                                       data/CMakeFiles
                                       data/cmake_install.cmake
                                       data/GNOME_FileBrowserApplet_Factory.server
                                       data/Makefile) 

ADD_CUSTOM_TARGET (xgettext xgettext ${CMAKE_CURRENT_SOURCE_DIR}/src/*.c --output-dir=${CMAKE_CURRENT_SOURCE_DIR}/po --from-code="UTF-8" -C --keyword="_")