summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorViktor Szakats <commit@vsz.me>2022-05-26 15:52:57 +0000
committerViktor Szakats <commit@vsz.me>2022-05-26 15:52:57 +0000
commita01e84300ec1ab2c991c978f71f0db05cfb2ad64 (patch)
treeb29548274f7f78d668de0dc70cb5364f83513d51 /CMakeLists.txt
parentd67f41acd3c7c5f6f0ce46ae9a1c1db1457b90d3 (diff)
downloadcurl-a01e84300ec1ab2c991c978f71f0db05cfb2ad64.tar.gz
cmake: fix detecting libidn2
Without this patch, libidn2 detection doesn't even seem to be attempted. With this patch, cmake can be configured to pick it up and enable it. Necessary configuration remains manual and differs from most other dependencies. If you are aware of a better fix, we're glad hearing about it in a new Issue. Closes #8917
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 621ae19d8..ee0cce08a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -675,11 +675,12 @@ if(NOT CURL_DISABLE_LDAPS)
check_include_file_concat("ldapssl.h" HAVE_LDAPSSL_H)
endif()
-# Check for idn
+# Check for idn2
option(USE_LIBIDN2 "Use libidn2 for IDN support" ON)
-set(HAVE_LIBIDN2 OFF)
if(USE_LIBIDN2)
check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2)
+else()
+ set(HAVE_LIBIDN2 OFF)
endif()
if(WIN32)