[scan-build] Create share directory similar to scan-view's

llvm-svn: 252981
This commit is contained in:
Jonathan Roelofs 2015-11-13 00:32:54 +00:00
parent 1f6689eae3
commit 2ec2acb03e
4 changed files with 10 additions and 10 deletions

View File

@ -21,7 +21,7 @@ endif()
set(ManPages
scan-build.1)
set(ResourceFiles
set(ShareFiles
scanview.css
sorttable.js)
@ -63,16 +63,16 @@ if(CLANG_INSTALL_SCANBUILD)
install(PROGRAMS ${ManPage} DESTINATION share/man/man1)
endforeach()
foreach(ResourceFile ${ResourceFiles})
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/bin/${ResourceFile}
foreach(ShareFile ${ShareFiles})
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile}
COMMAND ${CMAKE_COMMAND} -E make_directory
${CMAKE_BINARY_DIR}/bin
${CMAKE_BINARY_DIR}/share/scan-view
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/${ResourceFile}
${CMAKE_BINARY_DIR}/bin/
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${ResourceFile})
list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${ResourceFile})
install(FILES ${ResourceFile} DESTINATION bin)
${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile}
${CMAKE_BINARY_DIR}/share/scan-view/
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile})
list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile})
install(FILES ${ShareFile} DESTINATION share/scan-view)
endforeach()
add_custom_target(scan-build ALL DEPENDS ${Depends})

View File

@ -47,7 +47,7 @@ $(ShareDir)/man/man1/%: % Makefile $(ShareDir)/man/man1/.dir
$(Echo) "Copying $(notdir $<) to the 'share' directory..."
$(Verb)cp $< $@
$(ShareDir)/scan-build/%: % Makefile $(ShareDir)/scan-build/.dir
$(ShareDir)/scan-build/%: share/% Makefile $(ShareDir)/scan-build/.dir
$(Echo) "Copying $(notdir $<) to the 'share' directory..."
$(Verb)cp $< $@