From b4163b10e529f263c5f60a2abb718a672351d5be Mon Sep 17 00:00:00 2001 From: Pierre Guillot Date: Fri, 9 Aug 2024 13:01:56 +0200 Subject: [PATCH] Remove the HTML, Markdown and Screenshot from manual distribution in CMakeLists.txt: r --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 926710a..9213ea0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,16 +141,17 @@ endif() ### Manual ### set(WVP_MANUAL_DIR ${CMAKE_CURRENT_BINARY_DIR}/Manual) file(MAKE_DIRECTORY ${WVP_MANUAL_DIR}) + file(READ ${CMAKE_CURRENT_SOURCE_DIR}/docs/whisper-manual.md MANUAL_CONTENT) string(REPLACE "APPVERSION" "${WVP_BUILD_TAG} (${GIT_COMMIT_ID})" MANUAL_CONTENT ${MANUAL_CONTENT}) -string(REPLACE "src=\"../resource/" "src=\"./" MANUAL_CONTENT ${MANUAL_CONTENT}) -file(WRITE ${WVP_MANUAL_DIR}/whisper-manual.md ${MANUAL_CONTENT}) +string(REPLACE "src=\"../resource/" "src=\"${CMAKE_CURRENT_SOURCE_DIR}/resource/" MANUAL_CONTENT ${MANUAL_CONTENT}) +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/whisper-manual.md ${MANUAL_CONTENT}) + file(COPY ${CMAKE_CURRENT_BINARY_DIR}/_deps/whisper_cpp-src/models/download-ggml-model.cmd DESTINATION ${WVP_MANUAL_DIR}) file(COPY ${CMAKE_CURRENT_BINARY_DIR}/_deps/whisper_cpp-src/models/download-ggml-model.sh DESTINATION ${WVP_MANUAL_DIR}) -file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/resource/Screenshot.png DESTINATION ${WVP_MANUAL_DIR}) find_program(MDPDF_EXE "mdpdf") if(MDPDF_EXE) - add_custom_target(wvp_manual COMMAND ${MDPDF_EXE} ${WVP_MANUAL_DIR}/whisper-manual.md --debug VERBATIM) + add_custom_target(wvp_manual COMMAND ${MDPDF_EXE} ${CMAKE_CURRENT_BINARY_DIR}/whisper-manual.md ${WVP_MANUAL_DIR}/whisper-manual.pdf VERBATIM) else() message(STATUS "Manual target cannot be generated because mdpdf is not found") endif()