cmake: add option to disable building docs

This commit is contained in:
Viktor Szakats 2024-01-22 23:16:54 +01:00 committed by Daniel Stenberg
parent ea0b575dab
commit 3f08d80b22
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -54,11 +54,13 @@ add_custom_command(OUTPUT libcurl-symbols.md
VERBATIM VERBATIM
) )
add_manual_pages(man_MANS) if(BUILD_DOCS)
add_custom_target(man ALL DEPENDS ${man_MANS}) add_manual_pages(man_MANS)
if(NOT CURL_DISABLE_INSTALL) add_custom_target(man ALL DEPENDS ${man_MANS})
install(FILES "$<LIST:TRANSFORM,${man_MANS},PREPEND,${CMAKE_CURRENT_BINARY_DIR}/>" if(NOT CURL_DISABLE_INSTALL)
DESTINATION ${CMAKE_INSTALL_MANDIR}/man3) install(FILES "$<LIST:TRANSFORM,${man_MANS},PREPEND,${CMAKE_CURRENT_BINARY_DIR}/>"
endif() DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
endif()
add_subdirectory(opts) add_subdirectory(opts)
endif()