From fded366ea0fd4180ae55825fd9d8cac02f8fef40 Mon Sep 17 00:00:00 2001 From: Bablooos Date: Tue, 29 Nov 2016 20:45:37 +0800 Subject: [PATCH] Update CMakeLists.txt for BSD + libdl Fixing build failure of libwebsockets-test-fraggle on FreeBSD when LWS_WITH_PLUGINS. Solution: FreeBSD has no libdl --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 69dc673..0fa36c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1047,7 +1047,9 @@ if (NOT LWS_WITHOUT_TESTAPPS) if (UNIX AND LWS_WITH_PLUGINS) set(CMAKE_C_FLAGS "-fPIC ${CMAKE_C_FLAGS}") - target_link_libraries(websockets dl) + if(NOT(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")) + target_link_libraries(websockets dl) + endif() endif() if (NOT LWS_WITHOUT_SERVER) -- 2.7.4