From 6be725d6158e9b9efa2e21d81bb57e43b499f62b Mon Sep 17 00:00:00 2001 From: Henry LE BERRE Date: Thu, 14 Dec 2023 09:10:50 -0800 Subject: [PATCH] CMake Docs-gen: Fix call to examples.sh --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2dcd976ca..3d656d124 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -446,15 +446,16 @@ if (MFC_SYSCHECK) endif() if (MFC_DOCUMENTATION) - # Files in docs/examples are used to generate docs/documentation/examples.md - file(GLOB_RECURSE examples_DOCs CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/docs/examples/*") + # Files in examples/ are used to generate docs/documentation/examples.md + file(GLOB_RECURSE examples_DOCs CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/examples/*") add_custom_command( OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/examples.md" - DEPENDS "${examples_DOCs}" + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/docs/examples.sh;${examples_DOCs}" COMMAND "bash" "${CMAKE_CURRENT_SOURCE_DIR}/docs/examples.sh" "${CMAKE_CURRENT_SOURCE_DIR}" COMMENT "Generating examples.md" + VERBATIM ) file(GLOB common_DOCs CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/docs/*") @@ -486,7 +487,7 @@ if (MFC_DOCUMENTATION) "${CMAKE_CURRENT_BINARY_DIR}/${target}-Doxyfile" @ONLY) set(opt_example_dependency "") - if (target STREQUAL "documentation") + if (${target} STREQUAL documentation) set(opt_example_dependency "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/examples.md") endif()