1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 19:55:26 +03:00
aports/community/obs-studio/no-glvnd.patch
2022-09-02 11:43:38 +02:00

36 lines
1.2 KiB
Diff

cmake refuses to find EGL without glvnd, which alpine does not use yet
diff --git a/deps/glad/CMakeLists.txt b/deps/glad/CMakeLists.txt
index 0e49e1d..69dca8b 100644
--- a/deps/glad/CMakeLists.txt
+++ b/deps/glad/CMakeLists.txt
@@ -29,7 +29,10 @@ if(OS_WINDOWS)
target_sources(glad PRIVATE src/glad_wgl.c include/glad/glad_wgl.h obsglad.rc)
elseif(OS_POSIX AND NOT OS_MACOS)
- find_package(OpenGL REQUIRED)
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(EGL REQUIRED egl IMPORTED_TARGET GLOBAL)
+ add_library(OpenGL::EGL ALIAS PkgConfig::EGL)
+ #find_package(OpenGL REQUIRED)
if(TARGET OpenGL::EGL)
target_sources(glad PRIVATE src/glad_egl.c include/EGL/eglplatform.h
diff --git a/libobs-opengl/CMakeLists.txt b/libobs-opengl/CMakeLists.txt
index 78642d8..25b921a 100644
--- a/libobs-opengl/CMakeLists.txt
+++ b/libobs-opengl/CMakeLists.txt
@@ -57,10 +57,10 @@ elseif(OS_POSIX)
set_target_properties(libobs-opengl PROPERTIES PREFIX "")
if(ENABLE_WAYLAND)
- find_package(
- OpenGL
- COMPONENTS EGL
- REQUIRED)
+ # find_package(
+ # OpenGL
+ # COMPONENTS EGL
+ # REQUIRED)
find_package(Wayland REQUIRED)
target_sources(libobs-opengl PRIVATE gl-wayland-egl.c)