Commit ad146c5d authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Fix OpenGL include dependency.

This reverts commit 35a3e376.

Instead of adding OPENGL_INCLUDE_DIR to every module that depends on
vtkRenderingOpenGL, we add OPENGL_INCLUDE_DIR as one of the
vtkRenderingOpenGL_INCLUDE_DIRS. That way, any module depending on
vtkRenderingOpenGL will automatically know where to find gl.h since gl.h is
needed by the header files for classes in vtkRenderingOpenGL.

Change-Id: I6675c2b522e15b3fc6f7a80c28f91c56660b671e
parent 8fe60489
......@@ -30,6 +30,4 @@ set_source_files_properties(
ABSTRACT
)
include_directories(${OPENGL_INCLUDE_DIR})
vtk_module_library(vtkIOExport ${Module_SRCS})
......@@ -49,7 +49,4 @@ set_source_files_properties(
WRAP_EXCLUDE
)
include_directories(${OPENGL_INCLUDE_DIR})
vtk_module_library(vtkRenderingContext2D ${module_SRCS})
......@@ -32,7 +32,4 @@ set_source_files_properties(
WRAP_EXCLUDE
)
include_directories(${OPENGL_INCLUDE_DIR})
vtk_module_library(${vtk-module} ${Module_SRCS})
......@@ -5,8 +5,4 @@ set(Module_SRCS
set_source_files_properties(
vtkGL2PSContextDevice2D
WRAP_EXCLUDE)
include_directories(${OPENGL_INCLUDE_DIR})
vtk_module_library(${vtk-module} ${Module_SRCS})
......@@ -31,7 +31,4 @@ foreach(file ${shader_files})
set_source_files_properties(${file_we} WRAP_EXCLUDE)
endforeach()
include_directories(${OPENGL_INCLUDE_DIR})
vtk_module_library(${vtk-module} ${Module_SRCS})
......@@ -20,7 +20,5 @@ set_source_files_properties(
ABSTRACT
)
include_directories(${OPENGL_INCLUDE_DIR})
include_directories(${VTK_SOURCE_DIR}/Utilities) # octree
vtk_module_library(vtkRenderingLabel ${Module_SRCS})
......@@ -415,6 +415,11 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkRenderingOpenGLConfigure.h.in
# Set up some of the module specific preprocessor definitions.
set(${vtk-module}_EXPORT_CODE "#include \"vtkRenderingOpenGLConfigure.h\"")
# Since several headers in this module include vtkOpenGL.h which needed GL.h,
# need to ensure that any dependent modules inherit the include directory
# automatically.
set(${vtk-module}_INCLUDE_DIRS "${OPENGL_INCLUDE_DIR}")
vtk_module_library(vtkRenderingOpenGL ${Module_SRCS})
target_link_libraries(vtkRenderingOpenGL ${OPENGL_LIBRARIES} ${extra_libs})
if(VTK_USE_X)
......
......@@ -46,6 +46,4 @@ set_source_files_properties(
WRAP_EXCLUDE
)
include_directories(${OPENGL_INCLUDE_DIR})
vtk_module_library(vtkRenderingParallel ${Module_SRCS})
......@@ -117,7 +117,4 @@ set_source_files_properties(
WRAP_EXCLUDE
)
include_directories(${OPENGL_INCLUDE_DIR})
vtk_module_library(vtkRenderingVolumeOpenGL ${Module_SRCS})
......@@ -27,9 +27,6 @@ include_directories(
${GL2PS_GL_INCLUDE_DIR}
)
include_directories(${OPENGL_INCLUDE_DIR})
# Source files
set(GL2PS_srcs
gl2ps.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment