From 9df3cbaded023170731c0182a8d666d6ef2935c7 Mon Sep 17 00:00:00 2001 From: 5schatten Date: Thu, 26 Sep 2019 20:45:12 +0200 Subject: [PATCH] setup_toolchain: add OpenGL_GL_PREFERENCE to target config --- config/functions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/functions b/config/functions index 4aa19da2b0..98866b1872 100644 --- a/config/functions +++ b/config/functions @@ -341,6 +341,11 @@ setup_toolchain() { echo "SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> $CMAKE_CONF echo "SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> $CMAKE_CONF echo "SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)" >> $CMAKE_CONF + if [ "${DISPLAYSERVER}" = "x11" ]; then + if [ "${OPENGL}" = "mesa" ] || listcontains "${GRAPHIC_DRIVERS}" "nvidia"; then + echo "SET(OpenGL_GL_PREFERENCE GLVND)" >> $CMAKE_CONF + fi + fi fi export HOST_CC="$TOOLCHAIN/bin/host-gcc" export HOST_CXX="$TOOLCHAIN/bin/host-g++"