-
Notifications
You must be signed in to change notification settings - Fork 26
/
CMakeLists.txt
76 lines (63 loc) · 2.51 KB
/
CMakeLists.txt
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
# Copyright © 2007-2023 Evgeny Ratnikov
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 3.6.0 FATAL_ERROR)
PROJECT(TERMIT C)
SET(CMAKE_VERSION "${CMAKE_CACHE_MAJOR_VERSION}.${CMAKE_CACHE_MINOR_VERSION}.${CMAKE_CACHE_RELEASE_VERSION}")
INCLUDE(UsePkgConfig)
ADD_DEFINITIONS(-Wall)
SET(DEFAULT_XDG_DIR "/etc/xdg")
string(REPLACE ":" ";" XDG_DIRS "$ENV{XDG_CONFIG_DIRS}")
FOREACH(xdgDir ${XDG_DIRS})
SET(XDG_DIR ${xdgDir})
BREAK()
ENDFOREACH()
IF(NOT XDG_DIR)
SET(XDG_DIR "/etc/xdg")
ENDIF(NOT XDG_DIR)
SET(DEBUG FALSE CACHE BOOL "debug info")
SET(ENABLE_NLS TRUE CACHE BOOL "enable translation")
SET(XDG_DIR ${XDG_DIR} CACHE STRING "default xdg dir")
SET(TERMIT_PACKAGE "termit")
SET(TERMIT_PACKAGE_VERSION "3.1.0")
SET(TERMIT_LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/share/locale")
SET(TERMIT_XDG_DIR "${XDG_DIR}/termit")
SET(TERMIT_PACKAGE_NAME "termit - terminal emulator")
SET(TERMIT_PACKAGE_STRING "${TERMIT_PACKAGE} ${TERMIT_PACKAGE_VERSION}")
SET(TERMIT_PACKAGE_BUGREPORT "[email protected]")
CONFIGURE_FILE(${TERMIT_SOURCE_DIR}/config.h.in ${TERMIT_SOURCE_DIR}/config.h)
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake")
ADD_SUBDIRECTORY(doc)
ADD_SUBDIRECTORY(src)
IF(ENABLE_NLS)
ADD_SUBDIRECTORY(po)
ENDIF(ENABLE_NLS)
ADD_SUBDIRECTORY(utils)
ADD_SUBDIRECTORY(etc)
MESSAGE("\n termit ${TERMIT_PACKAGE_VERSION}\n")
MESSAGE("Prefix dir:.......... ${CMAKE_INSTALL_PREFIX}")
IF(ENABLE_NLS)
MESSAGE("Locales dir:......... ${TERMIT_LOCALE_DIR}")
ENDIF(ENABLE_NLS)
MESSAGE("Xdg dir:............. ${TERMIT_XDG_DIR}")
message("Gtk:................. ${GTK_VERSION}")
message("Vte:................. ${VTE_VERSION}")
message("Lua:................. ${LUA_VERSION}")
MESSAGE("Debug:............... ${DEBUG}")
MESSAGE("")