]> granicus.if.org Git - libjpeg-turbo/commitdiff
Build: Minor tweaks to GNUInstallDirs defaults
authorDRC <information@libjpeg-turbo.org>
Thu, 8 Dec 2016 01:14:20 +0000 (19:14 -0600)
committerDRC <information@libjpeg-turbo.org>
Thu, 8 Dec 2016 01:20:46 +0000 (19:20 -0600)
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.

BUILDING.md
CMakeLists.txt

index bc2a59d15a2757c1932c4b79ecc1cbd1aba52dbe..43cd69ff361e976c4397455c545371c3e3a7a645 100644 (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.
index ed447a1c449c4ee12ffcadb8c4fb0cb5ac3df941..d0b00683216119abe7862c30c18b79d7ad7237ba 100644 (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)