forked from herbstluftwm/herbstluftwm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
53 lines (45 loc) · 1.86 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
cmake_minimum_required(VERSION 3.1...3.13)
file(STRINGS VERSION VERSION) # read hlwm version from file 'VERSION'
project(Herbstluftwm
VERSION ${VERSION})
# use our cmake dir for include(…) statements
list(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_SOURCE_DIR}/cmake")
# make CMake behave our way
include(behavior)
# get project dependencies
include(dependencies)
# generate variable PROJECT_VERSION_GIT, provide function export_version()
include(gitversion)
# add custom (default) debug flags in variable cache
include(debugflags)
# find ccache (offered via ENABLE_CCACHE if available)
include(ccache)
## set install variables
# prefix for systemwide configuration, accompanies CMAKE_INSTALL_PREFIX
set(CMAKE_INSTALL_SYSCONF_PREFIX "/etc" CACHE PATH
"Top-level install path for configuration files. May be given relative to CMAKE_INSTALL_PREFIX.")
set(CONFIGDIR "${CMAKE_INSTALL_SYSCONF_PREFIX}/xdg/herbstluftwm")
set(BINDIR bin)
set(DATADIR share)
set(MANDIR ${DATADIR}/man)
set(DOCDIR ${DATADIR}/doc/herbstluftwm)
set(LICENSEDIR ${DOCDIR}
CACHE PATH "Install path for license file")
set(XSESSIONSDIR ${DATADIR}/xsessions
CACHE PATH "Install path for xsession file")
set(ZSHCOMPLETIONDIR ${DATADIR}/zsh/site-functions
CACHE PATH "Install path for zsh completions file")
set(FISHCOMPLETIONDIR ${DATADIR}/fish/vendor_completions.d
CACHE PATH "Install path for fish completions file")
set(BASHCOMPLETIONDIR ${DATADIR}/bash-completion/completions
CACHE PATH "Install path for bash completions file")
## do the actual work
add_subdirectory(ipc-client)
add_subdirectory(src)
add_subdirectory(doc)
add_subdirectory(share)
## install everything that was not installed from subdirectories
install(FILES NEWS DESTINATION ${DOCDIR})
install(FILES LICENSE DESTINATION ${LICENSEDIR})
install(DIRECTORY scripts/ DESTINATION ${DOCDIR}/examples USE_SOURCE_PERMISSIONS)
# vim: et:ts=4:sw=4