View | Details | Raw Unified | Return to bug 260878 | Differences between
and this patch

Collapse All | Expand All

(-)b/graphics/jasper/files/patch-build-cmake-modules-JasOpenGL.cmake (-1 / +19 lines)
Lines 1-4 Link Here
1
--- build/cmake/modules/JasOpenGL.cmake.orig	2020-09-05 14:52:22 UTC
1
--- build/cmake/modules/JasOpenGL.cmake.orig	2021-08-01 20:39:10 UTC
2
+++ build/cmake/modules/JasOpenGL.cmake
2
+++ build/cmake/modules/JasOpenGL.cmake
3
@@ -4,7 +4,7 @@
3
@@ -4,7 +4,7 @@
4
 
4
 
Lines 9-11 Link Here
9
 	message("OpenGL library found: ${OPENGL_FOUND}")
9
 	message("OpenGL library found: ${OPENGL_FOUND}")
10
 else()
10
 else()
11
 	set(OPENGL_FOUND false)
11
 	set(OPENGL_FOUND false)
12
@@ -32,6 +32,9 @@ if (JAS_ENABLE_OPENGL AND OPENGL_FOUND)
13
 	# On some systems (e.g., Fedora 21), there is a bug in the cmake code
14
 	# that detects GLUT libraries.  The following ugliness is a workaround for 
15
 	# this problem.
16
+	if(PKG_CONFIG_FOUND)
17
+		set(GLUT_LIBRARIES "${GLUT_LINK_LIBRARIES}")
18
+	else(PKG_CONFIG_FOUND)
19
 	if (NOT GLUT_Xmu_LIBRARY OR NOT GLUT_Xmi_LIBRARY)
20
 		if (NOT GLUT_Xmu_LIBRARY)
21
 			set(GLUT_Xmu_LIBRARY "")
22
@@ -45,6 +48,7 @@ if (JAS_ENABLE_OPENGL AND OPENGL_FOUND)
23
 		endif()
24
 		set(GLUT_LIBRARIES "${GLUT_glut_LIBRARY}")
25
 	endif()
26
+	endif(PKG_CONFIG_FOUND)
27
 else()
28
 	set(JAS_HAVE_OPENGL 0)
29
 	set(OPENGL_INCLUDE_DIR "")

Return to bug 260878