mirror of
https://github.com/curl/curl.git
synced 2026-01-18 17:21:26 +01:00
cmake: replace deprecated PERL_FOUND with Perl_FOUND
`Perl_FOUND` available since CMake v3.3. `PERL_FOUND` deprecated since v4.2. Ref: https://cmake.org/cmake/help/v4.2/module/FindPerl.html Closes #20011
This commit is contained in:
@@ -520,7 +520,7 @@ option(BUILD_LIBCURL_DOCS "Build libcurl man pages" ON)
|
||||
option(BUILD_MISC_DOCS "Build misc man pages (e.g. curl-config and mk-ca-bundle)" ON)
|
||||
option(ENABLE_CURL_MANUAL "Build the man page for curl and enable its -M/--manual option" ON)
|
||||
|
||||
if((ENABLE_CURL_MANUAL OR BUILD_LIBCURL_DOCS) AND NOT PERL_FOUND)
|
||||
if((ENABLE_CURL_MANUAL OR BUILD_LIBCURL_DOCS) AND NOT Perl_FOUND)
|
||||
message(WARNING "Perl not found. Will not build manuals.")
|
||||
endif()
|
||||
|
||||
@@ -1864,13 +1864,13 @@ set(_project_config "${_generated_dir}/${PROJECT_NAME}Config.cmake")
|
||||
set(_version_config "${_generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
|
||||
|
||||
option(BUILD_TESTING "Build tests" ON)
|
||||
if(BUILD_TESTING AND PERL_FOUND)
|
||||
if(BUILD_TESTING AND Perl_FOUND)
|
||||
set(CURL_BUILD_TESTING ON)
|
||||
else()
|
||||
set(CURL_BUILD_TESTING OFF)
|
||||
endif()
|
||||
|
||||
if(PERL_FOUND)
|
||||
if(Perl_FOUND)
|
||||
set(CURL_MANPAGE "${PROJECT_BINARY_DIR}/docs/cmdline-opts/curl.1")
|
||||
set(CURL_ASCIIPAGE "${PROJECT_BINARY_DIR}/docs/cmdline-opts/curl.txt")
|
||||
add_subdirectory(docs)
|
||||
|
||||
@@ -27,7 +27,7 @@ option(CURL_COMPLETION_ZSH "Install zsh completions" OFF)
|
||||
|
||||
if(CURL_COMPLETION_FISH OR
|
||||
CURL_COMPLETION_ZSH)
|
||||
if(PERL_FOUND)
|
||||
if(Perl_FOUND)
|
||||
if(CURL_COMPLETION_FISH)
|
||||
set(_completion_fish "${CMAKE_CURRENT_BINARY_DIR}/curl.fish")
|
||||
add_custom_command(OUTPUT "${_completion_fish}"
|
||||
|
||||
@@ -28,8 +28,8 @@ set(_curl_cfiles_gen "")
|
||||
set(_curl_hfiles_gen "")
|
||||
set(_curl_definitions "")
|
||||
|
||||
if(ENABLE_CURL_MANUAL AND (PERL_FOUND OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tool_hugehelp.c"))
|
||||
if(PERL_FOUND)
|
||||
if(ENABLE_CURL_MANUAL AND (Perl_FOUND OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tool_hugehelp.c"))
|
||||
if(Perl_FOUND)
|
||||
add_custom_command(OUTPUT "tool_hugehelp.c"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "#include \"tool_setup.h\"" > "tool_hugehelp.c"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "/* !checksrc! disable COPYRIGHT all */" >> "tool_hugehelp.c"
|
||||
@@ -55,7 +55,7 @@ if(ENABLE_CURL_MANUAL AND (PERL_FOUND OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/too
|
||||
endif()
|
||||
|
||||
if(CURL_CA_EMBED_SET)
|
||||
if(PERL_FOUND)
|
||||
if(Perl_FOUND)
|
||||
add_custom_command(OUTPUT "tool_ca_embed.c"
|
||||
COMMAND "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mk-file-embed.pl" --var curl_ca_embed
|
||||
< "${CURL_CA_EMBED}" > "tool_ca_embed.c"
|
||||
|
||||
Reference in New Issue
Block a user