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
13 lines
509 B
CMake
13 lines
509 B
CMake
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}")
|