mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 02:13:56 +09:00
LibGL: Create symlinks for headers and shared library
This allows ports to access the OpenGL headers using `#include <GL/gl.h>` and find the shared library at `/usr/lib/libGL.so` or `/usr/lib/libGL.so.1`, removing the need for explicit include paths or changed library names.
This commit is contained in:
parent
5cff59557e
commit
857ab2e06d
Notes:
sideshowbarker
2024-07-17 14:33:07 +09:00
Author: https://github.com/gmta
Commit: 857ab2e06d
Pull-request: https://github.com/SerenityOS/serenity/pull/23293
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/timschumi ✅
1 changed files with 9 additions and 0 deletions
|
@ -27,3 +27,12 @@ set(GENERATED_SOURCES
|
|||
|
||||
serenity_lib(LibGL gl)
|
||||
target_link_libraries(LibGL PRIVATE LibGfx LibGLSL LibGPU)
|
||||
|
||||
# Install symlinks at some common locations so ports can find LibGL without issue
|
||||
if (SERENITYOS)
|
||||
install(CODE "
|
||||
file(CREATE_LINK LibGL/GL/ \${CMAKE_INSTALL_PREFIX}/usr/include/GL SYMBOLIC)
|
||||
file(CREATE_LINK libgl.so.serenity \${CMAKE_INSTALL_PREFIX}/usr/lib/libGL.so SYMBOLIC)
|
||||
file(CREATE_LINK libgl.so.serenity \${CMAKE_INSTALL_PREFIX}/usr/lib/libGL.so.1 SYMBOLIC)
|
||||
")
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue