diff --git a/projects/hip/packaging/hip_doc.txt b/projects/hip/packaging/hip_doc.txt index bbcaf54ec8..d5a0c471b1 100644 --- a/projects/hip/packaging/hip_doc.txt +++ b/projects/hip/packaging/hip_doc.txt @@ -1,12 +1,19 @@ cmake_minimum_required(VERSION 2.8.3) project(hip_doc) -add_custom_target(build_doxygen ALL +find_program(DOXYGEN_EXE doxygen) +if(DOXYGEN_EXE) + add_custom_target(build_doxygen ALL COMMAND HIP_PATH=@hip_SOURCE_DIR@ doxygen @hip_SOURCE_DIR@/docs/doxygen-input/doxy.cfg) -add_custom_target(convert_md_to_html ALL + install(DIRECTORY RuntimeAPI/html DESTINATION docs/docs/RuntimeAPI) +endif() + +find_program(GRIP_EXE grip) +if(GRIP_EXE) + add_custom_target(convert_md_to_html ALL COMMAND @hip_SOURCE_DIR@/packaging/convert_md_to_html.sh @hip_SOURCE_DIR@ ${PROJECT_BINARY_DIR}/md2html) -install(DIRECTORY RuntimeAPI/html DESTINATION docs/docs/RuntimeAPI) -install(DIRECTORY md2html/ DESTINATION docs) + install(DIRECTORY md2html/ DESTINATION docs) +endif() ############################# # Packaging steps