Added using of new confirm_execute option when performing default action on a file.
[gnome-file-browser-applet:gnome-file-browser-applet.git] / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED (VERSION 2.4.7)
2
3 PROJECT (FILE_BROWSER_APPLET C)
4
5 # Compiler flags
6 SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -g -Wall -ansi")
7 SET (EXEC file-browser-applet)
8
9 # Version
10 ################################################################################
11 SET (VERSION_MAJOR 0)
12 SET (VERSION_MINOR 6)
13 SET (VERSION_PATCH 7)
14
15 # Install path options
16 ################################################################################
17 IF (NOT DEFINED CMAKE_INSTALL_PREFIX)
18     SET (CMAKE_INSTALL_PREFIX "/usr")
19 ENDIF (NOT DEFINED CMAKE_INSTALL_PREFIX)
20 MESSAGE (STATUS "Using CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
21 ################################################################################
22 IF (NOT DEFINED CMAKE_INSTALL_LIB_PREFIX)
23     SET (CMAKE_INSTALL_LIB_PREFIX "${CMAKE_INSTALL_PREFIX}/lib")
24 ENDIF (NOT DEFINED CMAKE_INSTALL_LIB_PREFIX)
25 MESSAGE (STATUS "Using CMAKE_INSTALL_LIB_PREFIX=${CMAKE_INSTALL_LIB_PREFIX}")
26 ################################################################################
27 IF (NOT DEFINED CMAKE_INSTALL_LIB_EXEC_DIR)
28     SET (CMAKE_INSTALL_LIB_EXEC_DIR "${CMAKE_INSTALL_LIB_PREFIX}/${EXEC}")
29 ENDIF (NOT DEFINED CMAKE_INSTALL_LIB_EXEC_DIR)
30 MESSAGE (STATUS "Using CMAKE_INSTALL_LIB_EXEC_DIR=${CMAKE_INSTALL_LIB_EXEC_DIR}")
31 ################################################################################
32 IF (NOT DEFINED CMAKE_INSTALL_BONOBO_DIR)
33     SET (CMAKE_INSTALL_BONOBO_DIR "${CMAKE_INSTALL_LIB_PREFIX}/bonobo/servers")
34 ENDIF (NOT DEFINED CMAKE_INSTALL_BONOBO_DIR)
35 MESSAGE (STATUS "Using CMAKE_INSTALL_BONOBO_DIR=${CMAKE_INSTALL_BONOBO_DIR}")
36 ################################################################################
37 IF (NOT DEFINED CMAKE_INSTALL_GCONF_SCHEMA_DIR)
38     SET(CMAKE_INSTALL_GCONF_SCHEMA_DIR "${CMAKE_INSTALL_PREFIX}/share/gconf/schemas")
39 ENDIF(NOT DEFINED CMAKE_INSTALL_GCONF_SCHEMA_DIR)
40 MESSAGE (STATUS "Using CMAKE_INSTALL_GCONF_SCHEMA_DIR=${CMAKE_INSTALL_GCONF_SCHEMA_DIR}")
41 ################################################################################
42 IF (NOT DEFINED CMAKE_INSTALL_BUILDER_UI_DIR)
43     SET(CMAKE_INSTALL_BUILDER_UI_DIR "${CMAKE_INSTALL_PREFIX}/share/${EXEC}/builder")
44 ENDIF(NOT DEFINED CMAKE_INSTALL_BUILDER_UI_DIR)
45 MESSAGE (STATUS "Using CMAKE_INSTALL_BUILDER_UI_DIR=${CMAKE_INSTALL_BUILDER_UI_DIR}\n")
46 ################################################################################
47
48 # Compile time options
49 SET (ENABLE_CONTEXT_MENU TRUE)
50 #SET (ENABLE_HELP_DOC TRUE)
51
52 ADD_SUBDIRECTORY (data)
53 ADD_SUBDIRECTORY (pixmaps)
54 ADD_SUBDIRECTORY (src)
55
56 # Uninstall target
57 CONFIGURE_FILE ("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
58                 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
59                 IMMEDIATE @ONLY)
60 ADD_CUSTOM_TARGET (uninstall
61                    "${CMAKE_COMMAND}" -P 
62                    "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
63
64 # Target to generate a distribution-ready tarball
65 SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY "File Browser Applet")
66 SET (CPACK_PACKAGE_VENDOR "Axel von Bertoldi")
67 SET (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
68 SET (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
69 SET (CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
70 SET (CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
71 SET (CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
72 SET (CPACK_GENERATOR TGZ)
73 SET (CPACK_SOURCE_PACKAGE_FILE_NAME
74     "${EXEC}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
75 SET (CPACK_SOURCE_GENERATOR TGZ)
76 SET (CPACK_SOURCE_IGNORE_FILES
77      "GNOME_FileBrowserApplet_Factory.server$"
78      "config.h$"
79      ".svn"
80      "build"
81      "doc"
82      "po")
83 INCLUDE (CPack)
84
85 ADD_CUSTOM_TARGET (deb checkinstall -D --pkgname="${EXEC}"
86                                        --pkgversion="${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}"
87                                        --install=0
88                                        --deldoc=1
89                                        --backup=0
90                                        --pkglicense="GPLv2"
91                                        --maintainer="bertoldia@gmail.com"
92                                        --pkggroup="GNOME Desktop Environment"
93                                        --requires="libpanel-applet2-0")
94
95 ADD_CUSTOM_TARGET (really-clean rm -fr CMakeCache.txt
96                                        cmake_install.cmake
97                                        ${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz
98                                        *.deb
99                                        CPackConfig.cmake
100                                        cmake_uninstall.cmake
101                                        CMakeFiles
102                                        CPackSourceConfig.cmake
103                                        install_manifest.txt
104                                        Makefile
105                                        _CPack_Packages
106                                        pixmaps/CMakeFiles
107                                        pixmaps/cmake_install.cmake
108                                        pixmaps/Makefile
109                                        src/${EXEC}
110                                        src/cmake_install.cmake
111                                        src/config.h
112                                        src/CMakeFiles
113                                        src/Makefile
114                                        data/CMakeFiles
115                                        data/cmake_install.cmake
116                                        data/GNOME_FileBrowserApplet_Factory.server
117                                        data/Makefile) 
118
119 ADD_CUSTOM_TARGET (xgettext xgettext ${CMAKE_CURRENT_SOURCE_DIR}/src/*.c --output-dir=${CMAKE_CURRENT_SOURCE_DIR}/po --from-code="UTF-8" -C --keyword="_")