cmake: use namespaced custom target names

Rename custom target to namespaced (unique) names to avoid colliding
with 3rd-party projects (e.g. libzip) built together with curl.

Reported-by: hammlee96 on github
Fixes #13324
Closes #13326
This commit is contained in:
Viktor Szakats 2024-04-09 10:17:22 +00:00
parent feb1a3527e
commit 3d569aaaf8
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
3 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@ if(BUILD_MISC_DOCS)
DEPENDS "${_man_misc}.md"
VERBATIM
)
add_custom_target("generate-${_man_misc}.1" ALL DEPENDS "${_man_target}")
add_custom_target("curl-generate-${_man_misc}.1" ALL DEPENDS "${_man_target}")
if(NOT CURL_DISABLE_INSTALL)
install(FILES "${_man_target}" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
endif()

View File

@ -73,7 +73,7 @@ add_custom_command(OUTPUT libcurl-symbols.md
)
add_manual_pages(man_MANS)
add_custom_target(man ALL DEPENDS ${man_MANS})
add_custom_target(curl-man ALL DEPENDS ${man_MANS})
if(NOT CURL_DISABLE_INSTALL)
unset(_src)
foreach(_f ${man_MANS})

View File

@ -26,8 +26,8 @@ transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.
include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
add_manual_pages(man_MANS)
add_custom_target(opts-man DEPENDS ${man_MANS})
add_dependencies(man opts-man)
add_custom_target(curl-opts-man DEPENDS ${man_MANS})
add_dependencies(curl-man curl-opts-man)
if(NOT CURL_DISABLE_INSTALL)
unset(_src)
foreach(_f ${man_MANS})