diff options
| author | Yingjie Wang <38576654+GaugeAndGravity@users.noreply.github.com> | 2026-02-13 18:40:30 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-13 23:40:30 +0000 |
| commit | eb0d3f9f01f3bfedad1765e5204d7f38e058d010 (patch) | |
| tree | 1d15cdaa06e286f9dfd66bf3c55424c3d317e9a3 | |
| parent | 81a029e5049853481c36379caeb1fa1beeb097ee (diff) | |
cmake: use OpenGL::GLES3 when OpenGL::GL does not exist (#13260)
This will allow to build on some systems without X.
| -rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c2a850c..f1a0087b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -476,7 +476,11 @@ function(protocolWayland) set(PROTOCOL_SOURCES "${PROTOCOL_SOURCES}" PARENT_SCOPE) endfunction() -target_link_libraries(hyprland_lib PUBLIC OpenGL::EGL OpenGL::GL Threads::Threads) +if(TARGET OpenGL::GL) + target_link_libraries(hyprland_lib PUBLIC OpenGL::EGL OpenGL::GL Threads::Threads) +else() + target_link_libraries(hyprland_lib PUBLIC OpenGL::EGL OpenGL::GLES3 Threads::Threads) +endif() pkg_check_modules(hyprland_protocols_dep hyprland-protocols>=0.6.4) if(hyprland_protocols_dep_FOUND) |
