From 1e6c01f31d371f74bb6e88b402ca09a0307fceb7 Mon Sep 17 00:00:00 2001 From: David Reid Date: Tue, 15 Jul 2025 07:20:52 +1000 Subject: [PATCH] Fix CMake script for NetBSD. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1639562c..22f1959a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -457,7 +457,10 @@ endif() set(COMMON_LINK_LIBRARIES) if (UNIX) - list(APPEND COMMON_LINK_LIBRARIES dl) # For dlopen(), etc. Most compilers will link to this by default, but some may not. + if(NOT CMAKE_SYSTEM_NAME STREQUAL "NetBSD") + list(APPEND COMMON_LINK_LIBRARIES dl) # For dlopen(), etc. Most compilers will link to this by default, but some may not. + endif() + list(APPEND COMMON_LINK_LIBRARIES pthread) # Some compilers will not link to pthread by default so list it here just in case. list(APPEND COMMON_LINK_LIBRARIES m)