From 091c35fb1b109af2ea51d489aab6bc28f98e087b Mon Sep 17 00:00:00 2001 From: howetuft <34142192+howetuft@users.noreply.github.com> Date: Thu, 11 Apr 2024 22:48:18 +0200 Subject: [PATCH] Fix OpenGL issue in Python virtual environment (#1766) See issue #1755 --- source/MaterialXRenderGlsl/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/MaterialXRenderGlsl/CMakeLists.txt b/source/MaterialXRenderGlsl/CMakeLists.txt index 27934bf5db..1748b70190 100644 --- a/source/MaterialXRenderGlsl/CMakeLists.txt +++ b/source/MaterialXRenderGlsl/CMakeLists.txt @@ -27,6 +27,10 @@ elseif(UNIX) message(FATAL_ERROR "Error in building MaterialXRenderGlsl: Xt was not found") endif() + if(SKBUILD) + set(OpenGL_GL_PREFERENCE LEGACY) + endif() + find_package(OpenGL REQUIRED) include_directories(${X11_INCLUDE_DIR}) endif()