Skip to content

Commit

Permalink
Use portable macro for the mandir path
Browse files Browse the repository at this point in the history
Caught with pkgsrc on NetBSD
  • Loading branch information
krytarowski committed Nov 7, 2015
1 parent af858ab commit 80aa416
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion cmake/modules/AddSphinxTarget.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
#
# This script was copied from the LLVM repository.
#

include(GNUInstallDirs)

function (add_sphinx_target builder project)
set(SPHINX_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/${builder}")
set(SPHINX_DOC_TREE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
Expand Down Expand Up @@ -53,7 +56,7 @@ function (add_sphinx_target builder project)
if (builder STREQUAL man)
# FIXME: We might not ship all the tools that these man pages describe
install(DIRECTORY "${SPHINX_BUILD_DIR}/" # Slash indicates contents of
DESTINATION share/man/man1)
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)

elseif (builder STREQUAL html)
install(DIRECTORY "${SPHINX_BUILD_DIR}"
Expand Down
8 changes: 5 additions & 3 deletions man-pages/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
INSTALL(FILES mindy.1 DESTINATION share/man/man1)
INSTALL(FILES mindycomp.1 DESTINATION share/man/man1)
INSTALL(FILES mindyexec.1 DESTINATION share/man/man1)
include(GNUInstallDirs)

INSTALL(FILES mindy.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
INSTALL(FILES mindycomp.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
INSTALL(FILES mindyexec.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)

0 comments on commit 80aa416

Please sign in to comment.