diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2020-12-22 15:31:03 -0500 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2021-01-08 22:36:43 -0500 |
commit | 83f1ca69290f9d6198fe4013488408f94736c5dc (patch) | |
tree | a73c4f84cb67df81fb303379bb954d2254cc22d4 | |
parent | d336ac33c1eb76ff5c757c0bdb3d79db0fd2ed43 (diff) | |
download | curl-83f1ca69290f9d6198fe4013488408f94736c5dc.tar.gz |
cmake: Add an option to disable libidn2
New option USE_LIBIDN2 defaults to ON for libidn2 detection. Prior to
this change libidn2 detection could not be turned off in cmake builds.
Reported-by: William A Rowe Jr
Fixes https://github.com/curl/curl/issues/6361
Closes https://github.com/curl/curl/pull/6362
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c26e2dcf..58f4bfb7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -618,7 +618,11 @@ if(NOT CURL_DISABLE_LDAPS) endif() # Check for idn -check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2) +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) +endif() # Check for symbol dlopen (same as HAVE_LIBDL) check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN) |