mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:44:58 +00: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
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