Package: limesuite / 18.06.0+dfsg-1

use-system-glew Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Description: Change build to use system libglew instead of local copy
Author: Andreas Bombe <aeb@debian.org>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/oglGraph/CMakeLists.txt
+++ b/src/oglGraph/CMakeLists.txt
@@ -2,26 +2,20 @@
 	dlgMarkers.cpp
 	GLFont.cpp
 	OpenGLGraph.cpp
-	glew/glew.c
 )
-include_directories(glew)
-include_directories(glew/GL)
+
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(GLEW REQUIRED glew)
+include_directories(${GLEW_INCLUDE_DIRS})
 
 #ignore warnings about narrowing: static font header
 if(CMAKE_COMPILER_IS_GNUCXX)
 	add_definitions(-Wno-narrowing)
 endif()
 
-ADD_DEFINITIONS(-DGLEW_STATIC)
 add_library(oglGraph STATIC ${oglGraph_src_files})
 target_include_directories(oglGraph PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
 
-if (APPLE)
-	set(GL_LIBS "-framework OpenGL" "-framework GLUT")
-elseif (UNIX)
-	set(GL_LIBS GL)
-endif()
-
 if(UNIX)
-	target_link_libraries(oglGraph ${GL_LIBS} ${wxWidgets_LIBRARIES})
+	target_link_libraries(oglGraph ${GLEW_LIBRARIES} ${wxWidgets_LIBRARIES})
 endif()
--- a/src/oglGraph/OpenGLGraph.h
+++ b/src/oglGraph/OpenGLGraph.h
@@ -7,7 +7,7 @@
 #ifndef OPENGL_GRAPH
 #define OPENGL_GRAPH
 
-#include "glew/GL/glew.h"
+#include <GL/glew.h>
 #if defined(__APPLE__)
 #include <OpenGL/gl.h>
 #else
--- a/src/oglGraph/GLFont.h
+++ b/src/oglGraph/GLFont.h
@@ -1,7 +1,7 @@
 #ifndef GL_FONT_H
 #define GL_FONT_H
 
-#include "glew/GL/glew.h"
+#include <GL/glew.h>
 #if defined(__APPLE__)
 #include <OpenGL/gl.h>
 #else