Build: Minor tweaks to GNUInstallDirs defaults

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.
This commit is contained in:
DRC
2016-12-07 19:14:20 -06:00
parent 2b29bca2a9
commit b0fcd0ccc5
2 changed files with 3 additions and 4 deletions

View File

@@ -660,7 +660,7 @@ NOTE: If setting one of these directory variables to a relative path using the
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.

View File

@@ -92,8 +92,8 @@ message(STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}")
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)
@@ -103,7 +103,6 @@ if(CMAKE_INSTALL_PREFIX STREQUAL "${CMAKE_INSTALL_DEFAULT_PREFIX}" AND UNIX)
set(CMAKE_INSTALL_DEFAULT_LIBDIR "lib32")
endif()
endif()
set(CMAKE_INSTALL_DEFAULT_MANDIR "man")
endif()
include(cmakescripts/GNUInstallDirs.cmake)