brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 07aec76 Raw
50 lines · plain
1option(CLANG_INSTALL_SCANVIEW "Install the scan-view tool" ON)2 3set(BinFiles4      scan-view)5 6set(ShareFiles7      ScanView.py8      Reporter.py9      startfile.py10      bugcatcher.ico)11 12if(CLANG_INSTALL_SCANVIEW)13  foreach(BinFile ${BinFiles})14    add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/bin/${BinFile}15                       COMMAND ${CMAKE_COMMAND} -E make_directory16                         ${CMAKE_BINARY_DIR}/bin17                       COMMAND ${CMAKE_COMMAND} -E copy18                         ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}19                         ${CMAKE_BINARY_DIR}/bin/20                       DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})21    list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})22    install(PROGRAMS bin/${BinFile}23            DESTINATION "${CMAKE_INSTALL_BINDIR}"24            COMPONENT scan-view)25  endforeach()26 27  foreach(ShareFile ${ShareFiles})28    add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile}29                       COMMAND ${CMAKE_COMMAND} -E make_directory30                         ${CMAKE_BINARY_DIR}/share/scan-view31                       COMMAND ${CMAKE_COMMAND} -E copy32                         ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile}33                         ${CMAKE_BINARY_DIR}/share/scan-view/34                       DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile})35    list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile})36    install(FILES share/${ShareFile}37            DESTINATION "${CMAKE_INSTALL_DATADIR}/scan-view"38            COMPONENT scan-view)39  endforeach()40 41  add_custom_target(scan-view ALL DEPENDS ${Depends})42  set_target_properties(scan-view PROPERTIES FOLDER "Misc")43 44  if(NOT LLVM_ENABLE_IDE)45    add_llvm_install_targets("install-scan-view"46                             DEPENDS scan-view47                             COMPONENT scan-view)48  endif()49endif()50