2020-12-22 23:19:50 -08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2024-01-03 06:32:00 +08:00
|
|
|
index a54c2ff..3b83a7f 100644
|
2020-12-22 23:19:50 -08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2024-04-24 17:57:12 +03:00
|
|
|
@@ -852,11 +852,11 @@ endif()
|
2022-07-05 23:57:47 +02:00
|
|
|
# Check for idn2
|
2021-08-12 04:38:08 +02:00
|
|
|
option(USE_LIBIDN2 "Use libidn2 for IDN support" ON)
|
|
|
|
if(USE_LIBIDN2)
|
2024-01-03 06:32:00 +08:00
|
|
|
- check_library_exists("idn2" "idn2_lookup_ul" "" HAVE_LIBIDN2)
|
|
|
|
- if(HAVE_LIBIDN2)
|
|
|
|
- set(CURL_LIBS "idn2;${CURL_LIBS}")
|
|
|
|
- check_include_file_concat("idn2.h" HAVE_IDN2_H)
|
|
|
|
- endif()
|
2024-04-24 17:57:12 +03:00
|
|
|
+ find_package(PkgConfig REQUIRED)
|
|
|
|
+ pkg_check_modules(LIBIDN2 REQUIRED libidn2)
|
2021-08-12 04:38:08 +02:00
|
|
|
+ set(HAVE_LIBIDN2 TRUE)
|
2022-01-19 18:15:16 +01:00
|
|
|
+ list(INSERT CURL_LIBS 0 ${LIBIDN2_LINK_LIBRARIES})
|
2024-04-15 20:43:14 +03:00
|
|
|
+ set(HAVE_IDN2_H TRUE)
|
2022-07-05 23:57:47 +02:00
|
|
|
else()
|
|
|
|
set(HAVE_LIBIDN2 OFF)
|
2020-12-22 23:19:50 -08:00
|
|
|
endif()
|