From cad1c9e9ac849e5f98a61b73b9bbef7b2acab700 Mon Sep 17 00:00:00 2001 From: IronicallySerious Date: Sat, 16 Mar 2019 20:19:56 +0530 Subject: [PATCH] Set OpenGL preference for conflicting GL libs --- CMakeLists.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f9bf55..01dcfc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,13 +21,14 @@ if (WIN32) endif (WIN32) if (UNIX) -FIND_PACKAGE(OpenGL REQUIRED) -FIND_PACKAGE(GLEW REQUIRED) -FIND_PACKAGE(PkgConfig REQUIRED) -pkg_search_module(GLFW REQUIRED glfw3) -FIND_PACKAGE(DevIL REQUIRED) -FIND_PACKAGE(SFML COMPONENTS audio REQUIRED) - MESSAGE(STATUS "Unix platform detected") + set(OpenGL_GL_PREFERENCE "GLVND") + FIND_PACKAGE(OpenGL REQUIRED) + FIND_PACKAGE(GLEW REQUIRED) + FIND_PACKAGE(PkgConfig REQUIRED) + pkg_search_module(GLFW REQUIRED glfw3) + FIND_PACKAGE(DevIL REQUIRED) + FIND_PACKAGE(SFML COMPONENTS audio REQUIRED) + MESSAGE(STATUS "Unix platform detected") endif (UNIX) # Include sub - projects.