]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: make libpsl required by default
authorViktor Szakats <commit@vsz.me>
Thu, 31 Oct 2024 11:12:49 +0000 (12:12 +0100)
committerViktor Szakats <commit@vsz.me>
Mon, 16 Dec 2024 18:39:46 +0000 (19:39 +0100)
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

index df860d2f1fb1999c91f147a5e1c253e0d5d8f35a..f5d70c891cb3c0c194aa28baddfbf80f2b868cdb 100644 (file)
@@ -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