Fix typo in cmake module for libidn2

This commit is contained in:
Sara Dickinson 2022-07-21 14:17:53 +01:00
parent c0e45395b8
commit 9d8eea97a5
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
* 2022-07-20
* Strengthen version determination for Libidn2 during cmake processing.
* Strengthen version determination for Libidn2 during cmake processing (thanks
jpbion).
* 2021-06-04: Version 1.7.0
* Make TLS Handshake timeout max 4/5th of timeout for the query,

View File

@ -52,7 +52,7 @@ if (LIBIDN2_INCLUDE_DIR AND LIBIDN2_LIBRARY)
)
endif ()
if (NOT LIBIDN2_VERSION AND LIBIDN2_INCLUDE_DIR AND EXISTS "${LIBIDN2_INCLUDE_DIR}/unbound.h")
if (NOT LIBIDN2_VERSION AND LIBIDN2_INCLUDE_DIR AND EXISTS "${LIBIDN2_INCLUDE_DIR}/idn2.h")
file(STRINGS "${LIBIDN2_INCLUDE_DIR}/idn2.h" LIBIDN2_H REGEX "^[ \t]*#[ \t]*define[ \t]+IDN2_VERSION[ \t]")
string(REGEX REPLACE "^.*IDN2_VERSION[ \t]+\"([0-9.]+)\".*$" "\\1" LIBIDN2_VERSION "${LIBIDN2_H}")
endif ()