From 84a226a30b2d43f8fb0da996152a8376f1e21d8e Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sat, 25 Feb 2017 14:40:24 +0100 Subject: 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 --- docs/cmdline-opts/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docs/cmdline-opts/CMakeLists.txt (limited to 'docs/cmdline-opts') diff --git a/docs/cmdline-opts/CMakeLists.txt b/docs/cmdline-opts/CMakeLists.txt new file mode 100644 index 000000000..ccee4a142 --- /dev/null +++ b/docs/cmdline-opts/CMakeLists.txt @@ -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}") -- cgit v1.2.3