2015-11-10 00:12:56 +08:00
|
|
|
option(CLANG_INSTALL_SCANVIEW "Install the scan-view tool" ON)
|
|
|
|
|
|
|
|
set(BinFiles
|
2015-11-14 03:56:07 +08:00
|
|
|
scan-view)
|
2015-11-10 00:12:56 +08:00
|
|
|
|
2015-11-13 08:25:04 +08:00
|
|
|
set(ShareFiles
|
2015-11-14 03:56:07 +08:00
|
|
|
ScanView.py
|
|
|
|
Reporter.py
|
|
|
|
startfile.py
|
2015-11-11 06:38:59 +08:00
|
|
|
FileRadar.scpt
|
|
|
|
GetRadarVersion.scpt
|
|
|
|
bugcatcher.ico)
|
2015-11-10 00:12:56 +08:00
|
|
|
|
|
|
|
if(CLANG_INSTALL_SCANVIEW)
|
|
|
|
foreach(BinFile ${BinFiles})
|
2015-11-11 06:38:59 +08:00
|
|
|
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/bin/${BinFile}
|
2015-11-10 00:12:56 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory
|
|
|
|
${CMAKE_BINARY_DIR}/bin
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
2015-11-14 04:34:15 +08:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}
|
2015-11-11 04:01:22 +08:00
|
|
|
${CMAKE_BINARY_DIR}/bin/
|
2015-11-14 04:34:15 +08:00
|
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})
|
2015-11-11 06:48:11 +08:00
|
|
|
list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
|
2019-10-04 13:43:20 +08:00
|
|
|
install(PROGRAMS bin/${BinFile}
|
|
|
|
DESTINATION bin
|
|
|
|
COMPONENT scan-view)
|
2015-11-10 00:12:56 +08:00
|
|
|
endforeach()
|
|
|
|
|
2015-11-13 08:25:04 +08:00
|
|
|
foreach(ShareFile ${ShareFiles})
|
|
|
|
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile}
|
2015-11-10 00:12:56 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory
|
|
|
|
${CMAKE_BINARY_DIR}/share/scan-view
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
2015-11-13 08:25:04 +08:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile}
|
2015-11-11 04:01:22 +08:00
|
|
|
${CMAKE_BINARY_DIR}/share/scan-view/
|
2015-11-13 08:25:04 +08:00
|
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile})
|
|
|
|
list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile})
|
2019-10-04 13:43:20 +08:00
|
|
|
install(FILES share/${ShareFile}
|
|
|
|
DESTINATION share/scan-view
|
|
|
|
COMPONENT scan-view)
|
2015-11-10 00:12:56 +08:00
|
|
|
endforeach()
|
2015-11-11 06:38:59 +08:00
|
|
|
|
|
|
|
add_custom_target(scan-view ALL DEPENDS ${Depends})
|
2015-11-12 02:13:42 +08:00
|
|
|
set_target_properties(scan-view PROPERTIES FOLDER "Misc")
|
2019-10-04 13:43:20 +08:00
|
|
|
|
|
|
|
if(NOT LLVM_ENABLE_IDE)
|
|
|
|
add_llvm_install_targets("install-scan-view"
|
|
|
|
DEPENDS scan-view
|
|
|
|
COMPONENT scan-view)
|
|
|
|
endif()
|
2015-11-10 00:12:56 +08:00
|
|
|
endif()
|