mirror of
https://github.com/curl/curl.git
synced 2026-08-25 12:03:39 +03:00
cmake: build manual pages (including curl.1)
Also make Perl mandatory to allow building the docs. While CMakeLists.txt could probably read the list of manual pages from Makefile.am, actually putting those in CMakeLists.txt is cleaner so that is what is done here. Fixes #1230 Ref: https://github.com/curl/curl/pull/1288
This commit is contained in:
parent
6f6e9193df
commit
84a226a30b
4 changed files with 24 additions and 6 deletions
3
docs/CMakeLists.txt
Normal file
3
docs/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#add_subdirectory(examples)
|
||||
#add_subdirectory(libcurl)
|
||||
add_subdirectory(cmdline-opts)
|
||||
12
docs/cmdline-opts/CMakeLists.txt
Normal file
12
docs/cmdline-opts/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
set(MANPAGE "${CMAKE_BINARY_DIR}/docs/curl.1")
|
||||
|
||||
# Load DPAGES and OTHERPAGES from shared file
|
||||
transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
||||
include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
||||
|
||||
add_custom_command(OUTPUT "${MANPAGE}"
|
||||
COMMAND "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/gen.pl" mainpage "${CMAKE_CURRENT_SOURCE_DIR}" > "${MANPAGE}"
|
||||
DEPENDS "${DPAGES}" "${OTHERPAGES}"
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(generate-curl.1 DEPENDS "${MANPAGE}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue