Commit 79b4ddc2 authored by David Reid's avatar David Reid

Fix CMake script for NetBSD and OpenBSD.

parent 0b9f03a3
...@@ -450,7 +450,12 @@ endif() ...@@ -450,7 +450,12 @@ endif()
set(COMMON_LINK_LIBRARIES) set(COMMON_LINK_LIBRARIES)
if (UNIX) if (UNIX)
list(APPEND COMMON_LINK_LIBRARIES dl) # For dlopen(), etc. Most compilers will link to this by default, but some may not. # Not all platforms actually use a separate "dl" library, notably NetBSD and OpenBSD.
find_library(LIB_DL "dl")
if(LIB_DL)
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 pthread) # Some compilers will not link to pthread by default so list it here just in case.
list(APPEND COMMON_LINK_LIBRARIES m) list(APPEND COMMON_LINK_LIBRARIES m)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment