From 3f08d80b2244524646ce86915c585509ac54fb4c Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 22 Jan 2024 23:16:54 +0100 Subject: [PATCH] cmake: add option to disable building docs --- docs/libcurl/CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/libcurl/CMakeLists.txt b/docs/libcurl/CMakeLists.txt index 0d52a7e567..a34d64e97a 100644 --- a/docs/libcurl/CMakeLists.txt +++ b/docs/libcurl/CMakeLists.txt @@ -54,11 +54,13 @@ add_custom_command(OUTPUT libcurl-symbols.md VERBATIM ) -add_manual_pages(man_MANS) -add_custom_target(man ALL DEPENDS ${man_MANS}) -if(NOT CURL_DISABLE_INSTALL) - install(FILES "$" - DESTINATION ${CMAKE_INSTALL_MANDIR}/man3) -endif() +if(BUILD_DOCS) + add_manual_pages(man_MANS) + add_custom_target(man ALL DEPENDS ${man_MANS}) + if(NOT CURL_DISABLE_INSTALL) + install(FILES "$" + DESTINATION ${CMAKE_INSTALL_MANDIR}/man3) + endif() -add_subdirectory(opts) + add_subdirectory(opts) +endif() -- 2.47.3