From a043e95d24f607c196d050ade8ae3f9533a32b0d Mon Sep 17 00:00:00 2001 From: Zion Date: Thu, 6 May 2021 19:14:31 -0700 Subject: [PATCH] Remove libopengl.so.0 hack, and use LEGACY CMake OpenGL option for AppImage builds (#10234) --- .ci/build-linux.sh | 1 + .ci/deploy-linux.sh | 1 - 3rdparty/CMakeLists.txt | 6 ++++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.ci/build-linux.sh b/.ci/build-linux.sh index fe53dcfd2f..3da5ff8184 100755 --- a/.ci/build-linux.sh +++ b/.ci/build-linux.sh @@ -51,6 +51,7 @@ cmake .. \ -DCMAKE_AR="$AR" \ -DCMAKE_RANLIB="$RANLIB" \ -DUSE_SYSTEM_CURL=ON \ + -DOpenGL_GL_PREFERENCE=LEGACY \ -G Ninja ninja; build_status=$?; diff --git a/.ci/deploy-linux.sh b/.ci/deploy-linux.sh index 4dda51f361..20800dea6b 100755 --- a/.ci/deploy-linux.sh +++ b/.ci/deploy-linux.sh @@ -13,7 +13,6 @@ if [ "$DEPLOY_APPIMAGE" = "true" ]; then ls ./appdir/usr/lib/ rm -r ./appdir/usr/share/doc cp "$(readlink -f /lib/x86_64-linux-gnu/libnsl.so.1)" ./appdir/usr/lib/libnsl.so.1 - cp "$(readlink -f /usr/lib/x86_64-linux-gnu/libOpenGL.so.0)" ./appdir/usr/lib/libOpenGL.so.0 export PATH=/rpcs3/build/squashfs-root/usr/bin/:${PATH} # Embed newer libstdc++ for distros that don't come with it (ubuntu 16.04) diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index d403d63537..d8cc208798 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -146,8 +146,10 @@ target_include_directories(3rdparty_cereal INTERFACE cereal/include) # OpenGL -# Prefer GLVND for OpenGL rather than legacy -set(OpenGL_GL_PREFERENCE GLVND) +# Prefer GLVND for OpenGL rather than legacy, unless it's been defined elsewhere, in the case of AppImage builds +if(NOT DEFINED OpenGL_GL_PREFERENCE) + set(OpenGL_GL_PREFERENCE GLVND) +endif() find_package(OpenGL REQUIRED) add_library(3rdparty_opengl INTERFACE)