2015-11-10 00:12:56 +08:00
|
|
|
option(CLANG_INSTALL_SCANVIEW "Install the scan-view tool" ON)
|
|
|
|
|
|
|
|
set(BinFiles
|
|
|
|
Reporter.py
|
|
|
|
ScanView.py
|
|
|
|
scan-view
|
|
|
|
startfile.py)
|
|
|
|
|
2015-11-13 08:25:04 +08:00
|
|
|
set(ShareFiles
|
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
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/${BinFile}
|
2015-11-11 04:01:22 +08:00
|
|
|
${CMAKE_BINARY_DIR}/bin/
|
|
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${BinFile})
|
2015-11-11 06:48:11 +08:00
|
|
|
list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
|
2015-11-10 00:12:56 +08:00
|
|
|
install(PROGRAMS ${BinFile} DESTINATION bin)
|
|
|
|
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})
|
|
|
|
install(FILES Shares/${ShareFile} DESTINATION share/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")
|
2015-11-10 00:12:56 +08:00
|
|
|
endif()
|