Commit 78a65cc6 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

mesa: add an option for using a system GL by default

parent e59877f0
......@@ -165,6 +165,7 @@ function (superbuild_add_packaging)
include(paraview.suffix)
list(APPEND superbuild_export_variables
MESA_SWR_ENABLED
PARAVIEW_DEFAULT_SYSTEM_GL
PARAVIEW_PACKAGE_SUFFIX
PARAVIEW_CATALYST_EDITION)
......
......@@ -2,6 +2,8 @@ set(PARAVIEW_EXTRA_CMAKE_ARGUMENTS ""
CACHE STRING "Extra arguments to be passed to ParaView when configuring.")
mark_as_advanced(PARAVIEW_EXTRA_CMAKE_ARGUMENTS)
option(PARAVIEW_DEFAULT_SYSTEM_GL "Default to using the system OpenGL" OFF)
set (paraview_extra_cmake_options)
if (PV_NIGHTLY_SUFFIX)
list(APPEND paraview_extra_cmake_options
......
......@@ -8,7 +8,8 @@ if (QT_LIBRARY_DIR)
endif ()
set(exclude_regexes)
if (mesa_built_by_superbuild OR osmesa_built_by_superbuild)
if (PARAVIEW_DEFAULT_SYSTEM_GL OR
(mesa_built_by_superbuild OR osmesa_built_by_superbuild))
list(APPEND exclude_regexes
".*/libglapi"
".*/libGL")
......@@ -50,12 +51,17 @@ if (osmesa_built_by_superbuild OR mesa_built_by_superbuild)
swrAVX2)
endif ()
set(suffix)
if (PARAVIEW_DEFAULT_SYSTEM_GL)
set(suffix "/mesa")
endif ()
foreach (mesa_library IN LISTS mesa_libraries)
superbuild_unix_install_plugin("lib${mesa_library}.so"
"lib/paraview-${paraview_version}/mesa"
"lib/paraview-${paraview_version}${suffix}"
"lib"
SEARCH_DIRECTORIES "${library_paths}"
LOCATION "lib/paraview-${paraview_version}/mesa")
LOCATION "lib/paraview-${paraview_version}${suffix}")
endforeach ()
endif ()
......
Supports Markdown
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