Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace GLX with EGL for X11 #389

Merged
merged 10 commits into from
May 30, 2024
Prev Previous commit
Next Next commit
remove GLX dependency from "OpenGL" component
christian-rauch committed May 30, 2024
commit 1e23cba3499d9a1f52c0112a4f0e418d415c2df5
14 changes: 12 additions & 2 deletions components/pango_opengl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -49,10 +49,20 @@ else()
find_package(OpenGL REQUIRED QUIET)
find_package(GLEW REQUIRED QUIET)
target_include_directories( ${COMPONENT} PUBLIC
$<BUILD_INTERFACE:${OPENGL_INCLUDE_DIR}>
$<BUILD_INTERFACE:${GLEW_INCLUDE_DIR}>
)
target_link_libraries( ${COMPONENT} PUBLIC
${GLEW_LIBRARY} ${OPENGL_LIBRARIES}
${GLEW_LIBRARY}
)

if(_LINUX_)
# EGL specific
find_package(OpenGL REQUIRED COMPONENTS OpenGL EGL)
target_link_libraries(${COMPONENT} PUBLIC ${GLEW_LIBRARY} OpenGL::EGL)
target_include_directories( ${COMPONENT} PUBLIC $<BUILD_INTERFACE:${OPENGL_EGL_INCLUDE_DIRS}>)
else()
# OpenGL defaults
target_link_libraries(${COMPONENT} PUBLIC ${GLEW_LIBRARY} ${OPENGL_LIBRARIES})
target_include_directories( ${COMPONENT} PUBLIC $<BUILD_INTERFACE:${OPENGL_INCLUDE_DIR}>)
endif()
endif()