diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index f41d0f7a2c..10d5ce21dd 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)