Merge pull request #3877 from 5schatten/cmake_glvnd

setup_toolchain: add OpenGL_GL_PREFERENCE to target config
This commit is contained in:
MilhouseVH 2019-10-09 18:41:55 +01:00 committed by GitHub
commit c30d9daf0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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++"