Просмотр исходного кода

GNUInstallDirs: use the proper default for info and man paths on OpenBSD

Rolf Eike Beer 11 лет назад
Родитель
Сommit
d4fdd9c189
1 измененных файлов с 20 добавлено и 8 удалено
  1. 20 8
      Modules/GNUInstallDirs.cmake

+ 20 - 8
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}")