Skip to content

Commit f7eda99

Browse files
bellenotdpiparo
authored andcommitted
Fix GLEW deprecation errors
- Move `TGLWSIncludes.h` from the `inc` to the `src` directory - Don't install the GLEW headers
1 parent 3ed564c commit f7eda99

File tree

5 files changed

+34
-54
lines changed

5 files changed

+34
-54
lines changed

builtins/glew/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,3 @@ install(TARGETS GLEW
5656
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
5757
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
5858
)
59-
60-
ROOT_INSTALL_HEADERS()

cmake/modules/RootMacros.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ function (ROOT_CXXMODULES_APPEND_TO_MODULEMAP library library_headers)
811811
TIsAProxy.h TVirtualIsAProxy.h
812812
DllImport.h ESTLType.h Varargs.h
813813
ThreadLocalStorage.h
814-
TBranchProxyTemplate.h TGLWSIncludes.h
814+
TBranchProxyTemplate.h
815815
snprintf.h strlcpy.h)
816816

817817
# Deprecated header files.

graf3d/gl/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(RGL
194194
src/TGLViewerEditor.cxx
195195
src/TGLVoxelPainter.cxx
196196
src/TGLWidget.cxx
197+
src/TGLWSIncludes.h
197198
src/TH2GL.cxx
198199
src/TH3GL.cxx
199200
src/TKDEAdapter.cxx
@@ -224,6 +225,7 @@ target_include_directories(RGL PRIVATE
224225
${OPENGL_INCLUDE_DIR}
225226
${FTGL_INCLUDE_DIR}
226227
${FREETYPE_INCLUDE_DIRS}
228+
${GLEW_INCLUDE_DIRS}
227229
)
228230

229231
if(builtin_gl2ps)
@@ -232,9 +234,6 @@ else()
232234
target_include_directories(RGL PRIVATE ${GL2PS_INCLUDE_DIRS})
233235
endif()
234236

235-
# Remove when not needed anymore in the ROOT 6.40 development cycle
236-
target_compile_definitions(RGL PRIVATE _ROOT_GL_BUILDS_ITSELF)
237-
238237
if(MSVC AND builtin_glew)
239238
target_compile_definitions (RGL PRIVATE "GLEW_STATIC")
240239
endif()

graf3d/gl/inc/TGLWSIncludes.h

Lines changed: 0 additions & 48 deletions
This file was deleted.

graf3d/gl/src/TGLWSIncludes.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// @(#)root/gl:$Id$
2+
// Authors: Timur and Matevz, May 2008
3+
4+
/*************************************************************************
5+
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
6+
* All rights reserved. *
7+
* *
8+
* For the licensing terms see $ROOTSYS/LICENSE. *
9+
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10+
*************************************************************************/
11+
12+
// Window-system specific GL includes.
13+
// Inclusion should only be necessary in in low-level system files.
14+
15+
#ifndef ROOT_TGLWSIncludes
16+
17+
#include "RConfigure.h"
18+
#include "TGLIncludes.h"
19+
20+
#if defined(WIN32)
21+
#include <GL/wglew.h>
22+
#else
23+
#if defined(__APPLE__) && !defined(R__HAS_COCOA)
24+
#define GLEW_APPLE_GLX
25+
#endif
26+
#if !defined(R__HAS_COCOA)
27+
#include <GL/glxew.h>
28+
#endif
29+
#endif
30+
31+
#endif

0 commit comments

Comments
 (0)