|
@@ -306,13 +306,19 @@ endif()
|
|
|
|
|
|
find_package(Perl)
|
|
|
|
|
|
-option(BUILD_DOCS "to build manual pages" ON)
|
|
|
-option(ENABLE_MANUAL "to provide the built-in manual" OFF)
|
|
|
-
|
|
|
-if(ENABLE_MANUAL AND PERL_FOUND)
|
|
|
- curl_nroff_check()
|
|
|
- if(NROFF_USEFUL)
|
|
|
- set(USE_MANUAL ON)
|
|
|
+option(BUILD_LIBCURL_DOCS "to build libcurl man pages" ON)
|
|
|
+# curl source release tarballs come with the curl man page pre-built.
|
|
|
+option(ENABLE_CURL_MANUAL "to build the man page for curl and enable its -M/--manual option" OFF)
|
|
|
+
|
|
|
+if(ENABLE_CURL_MANUAL OR BUILD_LIBCURL_DOCS)
|
|
|
+ if(PERL_FOUND)
|
|
|
+ curl_nroff_check()
|
|
|
+ if(NROFF_USEFUL)
|
|
|
+ set(HAVE_MANUAL_TOOLS ON)
|
|
|
+ endif()
|
|
|
+ endif()
|
|
|
+ if(NOT HAVE_MANUAL_TOOLS)
|
|
|
+ message(WARNING "Perl not found, or nroff not useful. Will not build manuals.")
|
|
|
endif()
|
|
|
endif()
|
|
|
|
|
@@ -1471,7 +1477,7 @@ set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
|
|
|
set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")
|
|
|
set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
|
|
|
|
|
|
-if(USE_MANUAL)
|
|
|
+if(HAVE_MANUAL_TOOLS)
|
|
|
add_subdirectory(docs)
|
|
|
endif()
|
|
|
|