From 7afbc39173f1dc00b99ebe3b08837d6d051672d6 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 31 Oct 2024 12:12:49 +0100 Subject: [PATCH] cmake: make libpsl required by default As done earlier in `./configure`: To force users to explictily disable it if they really don't want it used and make it harder to accidentally miss it. `-DCURL_USE_LIBPSL=OFF` is the option to use if PSL is not wanted. Follow-up to 2998874bb61ac6ef3b72d6a61467cd2aaf6e53ea #12661 Closes #15464 --- CMakeLists.txt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df860d2f1f..f5d70c891c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1114,15 +1114,11 @@ mark_as_advanced(CURL_USE_LIBPSL) set(USE_LIBPSL OFF) if(CURL_USE_LIBPSL) - find_package(Libpsl) # TODO: add REQUIRED to match autotools - if(LIBPSL_FOUND) - list(APPEND CURL_LIBS ${LIBPSL_LIBRARIES}) - list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libpsl") - include_directories(SYSTEM ${LIBPSL_INCLUDE_DIRS}) - set(USE_LIBPSL ON) - else() - message(WARNING "libpsl is enabled, but not found.") - endif() + find_package(Libpsl REQUIRED) + list(APPEND CURL_LIBS ${LIBPSL_LIBRARIES}) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libpsl") + include_directories(SYSTEM ${LIBPSL_INCLUDE_DIRS}) + set(USE_LIBPSL ON) endif() # libssh2 -- 2.47.3