[PATCH] D115601: Simplify AddSphinxTarget.cmake by just including `GNUInstallDirs`

John Ericson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 13 13:27:47 PST 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5f7afa96071c: Simplify AddSphinxTarget.cmake by just including `GNUInstallDirs` (authored by Ericson2314).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115601/new/

https://reviews.llvm.org/D115601

Files:
  llvm/cmake/modules/AddSphinxTarget.cmake


Index: llvm/cmake/modules/AddSphinxTarget.cmake
===================================================================
--- llvm/cmake/modules/AddSphinxTarget.cmake
+++ llvm/cmake/modules/AddSphinxTarget.cmake
@@ -1,3 +1,4 @@
+include(GNUInstallDirs)
 
 # Create sphinx target
 if (LLVM_ENABLE_SPHINX)
@@ -73,15 +74,10 @@
     # Handle installation
     if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
       if (builder STREQUAL man)
-        if (CMAKE_INSTALL_MANDIR)
-          set(INSTALL_MANDIR "${CMAKE_INSTALL_MANDIR}/")
-        else()
-          set(INSTALL_MANDIR share/man/)
-        endif()
         # FIXME: We might not ship all the tools that these man pages describe
         install(DIRECTORY "${SPHINX_BUILD_DIR}/" # Slash indicates contents of
                 COMPONENT "${project}-sphinx-man"
-                DESTINATION ${INSTALL_MANDIR}man1)
+                DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
 
         if(NOT LLVM_ENABLE_IDE)
           add_llvm_install_targets("install-${SPHINX_TARGET_NAME}"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115601.394035.patch
Type: text/x-patch
Size: 1015 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211213/1657bdc4/attachment.bin>


More information about the llvm-commits mailing list