It isn't actually necessary to specify `CMAKE_INSTALL_DEFAULT_MANDIR`
for our official build. Because `CMAKE_INSTALL_DEFAULT_DATAROOTDIR` is
blank for the official build, the default of "<DATAROOTDIR>/man" will
resolve to "man".
For the same reason, this commit changes the specification of
`CMAKE_INSTALL_DEFAULT_DOCDIR` and `CMAKE_INSTALL_DEFAULT_JAVADIR` in
the official build to be dependent on the data root directory (mainly to
make it obvious what we're doing.)
This commit also tweaks the example CMake command line in the directory
variable documentation so that it shows the correct location of the
CMake argument.
CMake command line, you must specify that the variable is of type `PATH`.
For example:
- cmake -DCMAKE_INSTALL_LIBDIR:PATH=lib
+ cmake -G"{generator type}" -DCMAKE_INSTALL_LIBDIR:PATH=lib {source_directory}
Otherwise, CMake will assume that the path is relative to the build directory
rather than the install directory.
if(CMAKE_INSTALL_PREFIX STREQUAL "${CMAKE_INSTALL_DEFAULT_PREFIX}" OR NOT UNIX)
set(CMAKE_INSTALL_DEFAULT_DATAROOTDIR "")
- set(CMAKE_INSTALL_DEFAULT_DOCDIR "doc")
- set(CMAKE_INSTALL_DEFAULT_JAVADIR "classes")
+ set(CMAKE_INSTALL_DEFAULT_DOCDIR "<DATAROOTDIR>/doc")
+ set(CMAKE_INSTALL_DEFAULT_JAVADIR "<DATAROOTDIR>/classes")
endif()
if(CMAKE_INSTALL_PREFIX STREQUAL "${CMAKE_INSTALL_DEFAULT_PREFIX}" AND UNIX)
if(NOT APPLE)
set(CMAKE_INSTALL_DEFAULT_LIBDIR "lib32")
endif()
endif()
- set(CMAKE_INSTALL_DEFAULT_MANDIR "man")
endif()
include(cmakescripts/GNUInstallDirs.cmake)