aboutsummaryrefslogtreecommitdiff
path: root/docs/cmdline-opts/CMakeLists.txt
blob: 3c020d418df58344b0cdd0445b8d3a4935d932eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
set(MANPAGE "${CURL_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}")