cmake: fix Find module and package names
- fix BearSSL warning about name mismatch. - fix Nettle Find module not found on Linux. - tidy-up: drop quotes from a package name. Package names must match case-sensitively to work on all platforms: - `find_package(<NAME> ...)` in `CMakeLists.txt`. - `CMake/Find<NAME>.cmake` filenames. - `find_package_handle_standard_args(<NAME> ...` in Find modules. - `message(STATUS "Found <NAME> ...` in Find modules. (to match the message shown by `find_package_handle_standard_args()`) Closes #14599
This commit is contained in:
parent
c5cb8e7c7e
commit
3a2e47afb7
@ -45,7 +45,7 @@ find_path(BEARSSL_INCLUDE_DIR NAMES "bearssl.h")
|
||||
find_library(BEARSSL_LIBRARY NAMES "bearssl")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(BEARSSL
|
||||
find_package_handle_standard_args(BearSSL
|
||||
REQUIRED_VARS
|
||||
BEARSSL_INCLUDE_DIR
|
||||
BEARSSL_LIBRARY
|
||||
|
||||
@ -44,7 +44,7 @@ endif()
|
||||
|
||||
if(NETTLE_FOUND)
|
||||
set(NETTLE_LIBRARIES ${NETTLE_LINK_LIBRARIES})
|
||||
message(STATUS "Found nettle (via pkg-config): ${NETTLE_INCLUDE_DIRS} (Found version \"${NETTLE_VERSION}\")")
|
||||
message(STATUS "Found Nettle (via pkg-config): ${NETTLE_INCLUDE_DIRS} (Found version \"${NETTLE_VERSION}\")")
|
||||
else()
|
||||
find_path(NETTLE_INCLUDE_DIR NAMES "nettle/sha2.h")
|
||||
find_library(NETTLE_LIBRARY NAMES "nettle")
|
||||
@ -64,7 +64,7 @@ else()
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args("nettle"
|
||||
find_package_handle_standard_args(Nettle
|
||||
REQUIRED_VARS
|
||||
NETTLE_INCLUDE_DIR
|
||||
NETTLE_LIBRARY
|
||||
|
||||
@ -615,7 +615,7 @@ if(CURL_USE_GNUTLS)
|
||||
if(NOT GNUTLS_FOUND)
|
||||
find_package(GnuTLS REQUIRED)
|
||||
endif()
|
||||
find_package(nettle REQUIRED)
|
||||
find_package(Nettle REQUIRED)
|
||||
set(_ssl_enabled ON)
|
||||
set(USE_GNUTLS ON)
|
||||
list(APPEND CURL_LIBS ${GNUTLS_LIBRARIES} ${NETTLE_LIBRARIES})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user