Make sure we unset the CMAKE_REQUIRED_LIBRARIES variable.
If we don't unset it, all the CMake checks will run with PortAudio in the library list. This didn't affect those who had PortAudio, but for select Debian systems without it, it breaks everything.
This commit is contained in:
parent
60591f51e1
commit
54072b9c8a
|
@ -490,6 +490,7 @@ if(NOT ANDROID)
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{ if(Pa_GetVersion() >= 1890) return 0; else return 1; }"
|
{ if(Pa_GetVersion() >= 1890) return 0; else return 1; }"
|
||||||
PORTAUDIO)
|
PORTAUDIO)
|
||||||
|
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||||
if(PORTAUDIO)
|
if(PORTAUDIO)
|
||||||
message("PortAudio found, enabling mic support")
|
message("PortAudio found, enabling mic support")
|
||||||
add_definitions(-DHAVE_PORTAUDIO=1)
|
add_definitions(-DHAVE_PORTAUDIO=1)
|
||||||
|
|
|
@ -13,11 +13,10 @@ check_function_exists("gethostbyaddr_r" HAS_GETHOSTBYADDR_R)
|
||||||
check_function_exists("inet_pton" HAS_INET_PTON)
|
check_function_exists("inet_pton" HAS_INET_PTON)
|
||||||
check_function_exists("inet_ntop" HAS_INET_NTOP)
|
check_function_exists("inet_ntop" HAS_INET_NTOP)
|
||||||
check_struct_has_member("struct msghdr" "msg_flags" "sys/types.h;sys/socket.h" HAS_MSGHDR_FLAGS)
|
check_struct_has_member("struct msghdr" "msg_flags" "sys/types.h;sys/socket.h" HAS_MSGHDR_FLAGS)
|
||||||
set(CMAKE_REQUIRED_LIBRARIES "")
|
|
||||||
set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h" "sys/socket.h")
|
set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h" "sys/socket.h")
|
||||||
check_type_size("socklen_t" HAS_SOCKLEN_T BUILTIN_TYPES_ONLY)
|
check_type_size("socklen_t" HAS_SOCKLEN_T BUILTIN_TYPES_ONLY)
|
||||||
unset(CMAKE_EXTRA_INCLUDE_FILES)
|
unset(CMAKE_EXTRA_INCLUDE_FILES)
|
||||||
|
|
||||||
if(HAS_FCNTL)
|
if(HAS_FCNTL)
|
||||||
add_definitions(-DHAS_FCNTL=1)
|
add_definitions(-DHAS_FCNTL=1)
|
||||||
endif()
|
endif()
|
||||||
|
@ -42,9 +41,9 @@ endif()
|
||||||
if(HAS_SOCKLEN_T)
|
if(HAS_SOCKLEN_T)
|
||||||
add_definitions(-DHAS_SOCKLEN_T=1)
|
add_definitions(-DHAS_SOCKLEN_T=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/include)
|
include_directories(${PROJECT_SOURCE_DIR}/include)
|
||||||
|
|
||||||
add_library(enet STATIC
|
add_library(enet STATIC
|
||||||
callbacks.c
|
callbacks.c
|
||||||
compress.c
|
compress.c
|
||||||
|
|
Loading…
Reference in New Issue