From 6f2e758156faa6437eaeef2a5a54824eb73e3e5a Mon Sep 17 00:00:00 2001 From: Nam Nguyen Date: Thu, 6 May 2021 10:00:40 +0000 Subject: [PATCH] Add -lGL and -lGLU to openjk_sp Fixes https://github.com/JACoders/OpenJK/issues/1036 Unbreaks crash when toggling fullscreen in the singleplayer binary on OpenBSD. openjk (multiplayer binary) uses -lGL and -lGLU but openjk_sp did not. --- code/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 2c9e7f509f..14c987d248 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -46,6 +46,14 @@ if(BuildSPEngine OR BuildJK2SPEngine) "${GSLIncludeDirectory}") # Dependencies + + if (NOT WIN32) + # OpenGL + find_package(OpenGL REQUIRED) + set(SPEngineIncludeDirectories ${SPEngineIncludeDirectories} ${OPENGL_INCLUDE_DIR}) + set(SPEngineLibraries ${SPEngineLibraries} ${OPENGL_LIBRARIES}) + endif() + # OpenAL (is optionally included for Windows) if(MSVC AND NOT WIN64) if(UseInternalOpenAL)