summaryrefslogtreecommitdiffstats
path: root/tools/scan-build
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-11-20 18:49:02 +0000
committerChris Bieneman <beanz@apple.com>2015-11-20 18:49:02 +0000
commitf57d2f430da6df55c405e1c85a02e233dac5c892 (patch)
treea34148bad59138b993af177535841efef30ed051 /tools/scan-build
parentcdf86baa9b7198b6a405d2d6ac88b4c14485860a (diff)
Honor system specific paths of MAN pages
Summary: Caught on NetBSD. Patch by: Kamil Rytarowski (krytarowski) Reviewers: beanz, jroelofs Subscribers: cfe-commits, joerg Differential Revision: http://reviews.llvm.org/D14800 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253693 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/scan-build')
-rw-r--r--tools/scan-build/CMakeLists.txt13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/scan-build/CMakeLists.txt b/tools/scan-build/CMakeLists.txt
index ec7b8ad0ae..78c243d8e0 100644
--- a/tools/scan-build/CMakeLists.txt
+++ b/tools/scan-build/CMakeLists.txt
@@ -1,5 +1,7 @@
option(CLANG_INSTALL_SCANBUILD "Install the scan-build tool" ON)
+include(GNUInstallDirs)
+
if (WIN32 AND NOT CYGWIN)
set(BinFiles
scan-build.bat)
@@ -52,15 +54,15 @@ if(CLANG_INSTALL_SCANBUILD)
endforeach()
foreach(ManPage ${ManPages})
- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/share/man/man1/${ManPage}
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/${ManPage}
COMMAND ${CMAKE_COMMAND} -E make_directory
- ${CMAKE_BINARY_DIR}/share/man/man1
+ ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/man/${ManPage}
- ${CMAKE_BINARY_DIR}/share/man/man1/
+ ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/man/${ManPage})
- list(APPEND Depends ${CMAKE_BINARY_DIR}/share/man/man1/${ManPage})
- install(PROGRAMS man/${ManPage} DESTINATION share/man/man1)
+ list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/man1/${ManPage})
+ install(PROGRAMS man/${ManPage} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
endforeach()
foreach(ShareFile ${ShareFiles})
@@ -78,4 +80,3 @@ if(CLANG_INSTALL_SCANBUILD)
add_custom_target(scan-build ALL DEPENDS ${Depends})
set_target_properties(scan-build PROPERTIES FOLDER "Misc")
endif()
-