Skip to content

Commit

Permalink
Add -lGL and -lGLU to openjk_sp
Browse files Browse the repository at this point in the history
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
namtsui authored and Aisha Tammy committed May 10, 2021
1 parent ff42a9f commit 0cbf072
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
3 changes: 2 additions & 1 deletion games/openjk/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.12 2021/02/07 18:59:12 bcallah Exp $
# $OpenBSD: Makefile,v 1.13 2021/05/06 20:54:50 namn Exp $

# Avoid future EPOCH bumps.
COMMENT = open source reimplementation of Jedi Academy game
Expand All @@ -8,6 +8,7 @@ CATEGORIES = games x11
GH_ACCOUNT = JACoders
GH_PROJECT = OpenJK
GH_COMMIT = d2ed03a016f54917bc1dcf06bcc59d3f674fb533
REVISION = 0

HOMEPAGE = https://openjk.org/
MAINTAINER = Brian Callahan <bcallah@openbsd.org>
Expand Down
28 changes: 28 additions & 0 deletions games/openjk/patches/patch-code_CMakeLists_txt
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)

0 comments on commit 0cbf072

Please sign in to comment.