1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-21 23:32:35 +00:00

build: Use CXX symbol checking for libutp (#4909)

This commit is contained in:
Bheesham Persaud 2023-02-18 16:10:50 -05:00 committed by GitHub
parent 9f2040d093
commit 05e79d01db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,7 @@ find_library(UTP_LIBRARY
HINTS ${_UTP_LIBDIR})
if(UTP_INCLUDE_DIR AND UTP_LIBRARY)
include(CheckSymbolExists)
include(CheckCXXSymbolExists)
set(_UTP_FUNCS
utp_check_timeouts
@ -53,7 +53,7 @@ if(UTP_INCLUDE_DIR AND UTP_LIBRARY)
foreach(_UTP_FUNC IN LISTS _UTP_FUNCS)
string(MAKE_C_IDENTIFIER "HAVE_${_UTP_FUNC}" _UTP_FUNC_VAR)
string(TOUPPER "${_UTP_FUNC_VAR}" _UTP_FUNC_VAR)
check_symbol_exists(${_UTP_FUNC} libutp/utp.h ${_UTP_FUNC_VAR})
check_cxx_symbol_exists(${_UTP_FUNC} libutp/utp.h ${_UTP_FUNC_VAR})
if(NOT ${_UTP_FUNC_VAR})
unset(UTP_INCLUDE_DIR CACHE)
unset(UTP_LIBRARY CACHE)