1#
2# Figure out install paths for stuff
3#
4
5# CMAKE_INSTALL_PREFIX is the user's responsibility to set right.  We
6# just assume it is.
7
8
9# Where ctwm looks for fallback config files
10if(NOT ETCDIR)
11	set(ETCDIR ${CMAKE_INSTALL_PREFIX}/etc)
12endif(NOT ETCDIR)
13
14
15# Where we stick the binary
16if(NOT BINDIR)
17	set(BINDIR ${CMAKE_INSTALL_PREFIX}/bin)
18endif(NOT BINDIR)
19
20
21# Where runtime data stuff (e.g., images) is found
22if(NOT DATADIR)
23	set(DATADIR ${CMAKE_INSTALL_PREFIX}/share/ctwm)
24endif(NOT DATADIR)
25
26
27# Where we install non-manpage docs to
28if(NOT DOCDIR)
29	set(DOCDIR ${CMAKE_INSTALL_PREFIX}/share/doc/ctwm)
30endif(NOT DOCDIR)
31
32
33# Where we put example configs etc.
34if(NOT EXAMPLEDIR)
35	set(EXAMPLEDIR ${CMAKE_INSTALL_PREFIX}/share/examples/ctwm)
36endif(NOT EXAMPLEDIR)
37
38
39# Where should we stick manpages?
40# User can set MANDIR to override, if they don't, check a few likely
41# places...
42if(NOT MANDIR)
43	find_file(MANDIR man
44		PATHS
45			"${CMAKE_INSTALL_PREFIX}/share"
46			"${CMAKE_INSTALL_PREFIX}"
47		NO_DEFAULT_PATH)
48endif(NOT MANDIR)
49
50# If we can't find something, hardcode a guess and yell about it
51if(NOT MANDIR)
52	set(MANDIR "${CMAKE_INSTALL_PREFIX}/man")
53	message(WARNING "Can't find install base for manpages, "
54			"assuming ${MANDIR}")
55endif(NOT MANDIR)
56
57# Since we only have 1 manpage, and it's in section 1, just list the man1
58# dir.
59set(MAN1PATH "${MANDIR}/man1")
60
61# This is fixed too
62set(PIXMAPDIR ${DATADIR}/images)
63