cmake: add curl-optiontable, curl-listhelp, curl-listcats targets

To match autotools `optiontable`, `listhelp`, `listcats` targets.

Closes #20014
This commit is contained in:
Viktor Szakats 2025-12-18 02:33:31 +01:00
parent 7e2b15ee56
commit d7bde803ee
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
2 changed files with 25 additions and 0 deletions

View file

@ -346,3 +346,12 @@ if(CURL_ENABLE_EXPORT_TARGET)
NAMESPACE ${PROJECT_NAME}::
)
endif()
if(PERL_EXECUTABLE)
add_custom_target(curl-optiontable
COMMENT "Generating lib/easyoptions.c" VERBATIM USES_TERMINAL
COMMAND "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/optiontable.pl" < "${PROJECT_SOURCE_DIR}/include/curl/curl.h"
> "${PROJECT_SOURCE_DIR}/lib/easyoptions.c"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/optiontable.pl" "${PROJECT_SOURCE_DIR}/include/curl/curl.h"
)
endif()