From: DRC Date: Thu, 8 Dec 2016 01:14:20 +0000 (-0600) Subject: Build: Minor tweaks to GNUInstallDirs defaults X-Git-Tag: 1.5.90~87 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b0fcd0ccc567bbfa3935fb708372d2d5684beb8a;p=libjpeg-turbo 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 "/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. --- diff --git a/BUILDING.md b/BUILDING.md index bc2a59d..43cd69f 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -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. diff --git a/CMakeLists.txt b/CMakeLists.txt index ed447a1..d0b0068 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 "/doc") + set(CMAKE_INSTALL_DEFAULT_JAVADIR "/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)