$NetBSD$ Avoid linking against non-existent libdl. From upstream, see https://code.ros.org/trac/opencv/ticket/726 --- CMakeLists.txt.orig 2010-04-06 01:24:37.000000000 +0000 +++ CMakeLists.txt @@ -438,7 +438,7 @@ if(UNIX) endif() endif() - if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") set(OPENCV_LINKER_LIBS m pthread) else() set(OPENCV_LINKER_LIBS dl m pthread rt)