From 42a9a0af3e3e626b9ce8f98b65a3ddb8aa099563 Mon Sep 17 00:00:00 2001 From: fryshorts Date: Sun, 3 May 2015 14:38:24 +0200 Subject: [PATCH] deps-glad: Only link to libdl on Linux Only link to libdl when on Linux. FreeBSD for example has this built into their libc. --- deps/glad/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deps/glad/CMakeLists.txt b/deps/glad/CMakeLists.txt index 95d80762d..0fe6a937b 100644 --- a/deps/glad/CMakeLists.txt +++ b/deps/glad/CMakeLists.txt @@ -43,8 +43,13 @@ endif() if(NOT WIN32 AND NOT APPLE) set(glad_PLATFORM_DEPS - -ldl ${X11_X11_LIB}) + # only link to libdl on linux + if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(glad_PLATFORM_DEPS + ${glad_PLATFORM_DEPS} + -ldl) + endif() endif() target_link_libraries(glad