summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMake/resources.cmake11
1 files changed, 3 insertions, 8 deletions
diff --git a/CMake/resources.cmake b/CMake/resources.cmake
index eb2e1a4b3..8af7ca2cd 100644
--- a/CMake/resources.cmake
+++ b/CMake/resources.cmake
@@ -106,14 +106,9 @@ if(HAVE_DLFCN_H)
set(HAVE_DLFCN_H 1)
endif(HAVE_DLFCN_H)
-if(LIB_dl)
- set(CMAKE_REQUIRED_LIBRARIES ${LIB_dl})
- CHECK_FUNCTION_EXISTS(dlsym HAVE_DLSYM)
- set(CMAKE_REQUIRED_LIBRARIES)
-else()
-# test also for systems where dlsym() is not in libdl (e.g., NetBSD, FreeBSD)
- CHECK_FUNCTION_EXISTS(dlsym HAVE_DLSYM)
-endif(LIB_dl)
+set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS})
+CHECK_FUNCTION_EXISTS(dlsym HAVE_DLSYM)
+set(CMAKE_REQUIRED_LIBRARIES)
CHECK_FUNCTION_EXISTS(localeconv HAVE_LOCALECONV)