forked from openbsd/ports
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unbreaks crash when toggling fullscreen in openjk_sp (singleplayer binary). openjk (multiplayer binary) is linked with -lGL -lGLU, but openjk_sp lacks these flags. see: JACoders/OpenJK#1037 ok bcallah@ and tobhe@
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
$OpenBSD: patch-code_CMakeLists_txt,v 1.1 2021/05/06 20:54:50 namn Exp $ | ||
|
||
Add -lGL and -lGLU to openjk_sp | ||
|
||
see: https://github.com/JACoders/OpenJK/pull/1037 | ||
|
||
Unbreaks crash when toggling fullscreen in the singleplayer binary on | ||
OpenBSD. openjk (multiplayer binary) uses -lGL and -lGLU but openjk_sp | ||
did not. | ||
|
||
Index: code/CMakeLists.txt | ||
--- code/CMakeLists.txt.orig | ||
+++ 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) |