$NetBSD$
Disable search for lib_dl

--- CMakeLists.txt.orig	2017-01-14 10:19:31.656873079 +0000
+++ CMakeLists.txt	2017-01-14 10:19:57.737004283 +0000
@@ -276,7 +276,7 @@
 	find_library (LIB_WS32 ws2_32)
 	set (SYS_LIBS ${SYS_LIBS} ${LIB_WS32})
 ELSE ()
-	if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+	if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "BSD$")
 		find_library (LIB_DL dl)
 		set (SYS_LIBS ${LIB_DL})
 	endif()
