From f464b95afbfcd04338bca46788d29773a90d2395 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 5 Feb 2020 17:40:27 +0000 Subject: [PATCH] Build fix on *BSD. dns resolution belongs to the libc on those systems. --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ae7dead1..dcdd2ef29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,7 +162,11 @@ include_directories("${PROJECT_SOURCE_DIR}/lib/bullet/src") if(WIN32) set(LIBRESOLV_LIBRARY) else() - find_library(LIBRESOLV_LIBRARY NAMES resolv libresolv) + if (NOT CMAKE_SYSTEM_NAME MATCHES "BSD") + find_library(LIBRESOLV_LIBRARY NAMES resolv libresolv) + else() + set(LIBRESOLV_LIBRARY) + endif() endif() # Find system ENet library or build it if missing