From d4fdd9c189f85d659f4294f8ec6da3e7e51215ec Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Tue, 20 May 2014 18:14:10 +0200 Subject: [PATCH] GNUInstallDirs: use the proper default for info and man paths on OpenBSD --- Modules/GNUInstallDirs.cmake | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake index d868cb31c..eac553d2d 100644 --- a/Modules/GNUInstallDirs.cmake +++ b/Modules/GNUInstallDirs.cmake @@ -192,9 +192,26 @@ if(NOT CMAKE_INSTALL_DATADIR) set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}") endif() -if(NOT CMAKE_INSTALL_INFODIR) - set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (DATAROOTDIR/info)") - set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info") +if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") + if(NOT CMAKE_INSTALL_INFODIR) + set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (info)") + set(CMAKE_INSTALL_INFODIR "info") + endif() + + if(NOT CMAKE_INSTALL_MANDDIR) + set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (man)") + set(CMAKE_INSTALL_MANDIR "man") + endif() +else() + if(NOT CMAKE_INSTALL_INFODIR) + set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (DATAROOTDIR/info)") + set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info") + endif() + + if(NOT CMAKE_INSTALL_MANDDIR) + set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)") + set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man") + endif() endif() if(NOT CMAKE_INSTALL_LOCALEDIR) @@ -202,11 +219,6 @@ if(NOT CMAKE_INSTALL_LOCALEDIR) set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale") endif() -if(NOT CMAKE_INSTALL_MANDIR) - set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)") - set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man") -endif() - if(NOT CMAKE_INSTALL_DOCDIR) set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)") set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}")