From 35271459e767bfab09d07dabff76cdc424f2808f Mon Sep 17 00:00:00 2001 From: xuveroleg Date: Tue, 24 Apr 2018 17:28:46 +0300 Subject: [PATCH] fix `dl` link error fixes https://github.com/JoeyDeVries/LearnOpenGL/issues/64 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 756acbe10..6b3e7acd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,7 @@ elseif(UNIX AND NOT APPLE) # note that the order is important for setting the libs # use pkg-config --libs $(pkg-config --print-requires --print-requires-private glfw3) in a terminal to confirm set(LIBS ${GLFW3_LIBRARY} X11 Xrandr Xinerama Xi Xxf86vm Xcursor GL dl pthread ${ASSIMP_LIBRARY}) + set (CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -ldl") elseif(APPLE) INCLUDE_DIRECTORIES(/System/Library/Frameworks) FIND_LIBRARY(COCOA_LIBRARY Cocoa)