From 3f7cb44fffb2beea003892fa2709025d23040c17 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Wed, 13 Apr 2011 22:28:40 +0200 Subject: [PATCH] In kFreeBSD the library dl is not linked The toolchain in sid on kFreeBSD has changed and the library dl is no longer linked implicit. fixes #1072 --- src/common/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index e36aeaa2..710cfbcd 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -91,8 +91,15 @@ if(APPLE) endif(APPLE) if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + set(FIND_LIBDL TRUE) +endif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "kFreeBSD") + set(FIND_LIBDL TRUE) +endif(CMAKE_HOST_SYSTEM_NAME STREQUAL "kFreeBSD") + +if(FIND_LIBDL) find_library(libdl dl) if(NOT libdl MATCHES "NOTFOUND") target_link_libraries(mod_common ${libdl}) endif(NOT libdl MATCHES "NOTFOUND") -endif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") +endif(FIND_LIBDL) -- 2.20.1