From e84acd86eb92b86d2323268e5b48155d98ea08dc Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Wed, 3 Nov 2021 15:23:10 +0100 Subject: [PATCH] CMake: fix macOS build without Asciidoctor Fix an error when running cmake on macOS without Asciidoctor: The dependency target "manpages" of target "wireshark" does not exist. Fixes: 44bd3a7d7923 ("CMake+Docs: Update our man page targets.") --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cb5c992446..50c30f7f5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2530,7 +2530,11 @@ if(BUILD_wireshark AND QT_FOUND) endif() if(ENABLE_APPLICATION_BUNDLE) - add_dependencies(wireshark manpages) + if(ASCIIDOCTOR_FOUND) + # Make sure to generate files referenced by + # BUNDLE_RESOURCE_SHARE_MAN1_FILES + add_dependencies(wireshark manpages) + endif() set_target_properties( wireshark PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_BINARY_DIR}/packaging/macosx/Info.plist