mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-14 08:45:46 -04:00
Common: Add GL context wrapper implementation
This commit is contained in:
@ -2,7 +2,13 @@ set(SRCS
|
||||
src/glad.c
|
||||
)
|
||||
|
||||
add_library(glad ${SRCS})
|
||||
# Linking as a static library breaks on macOS, see https://github.com/libigl/libigl/issues/751
|
||||
if(APPLE)
|
||||
add_library(glad OBJECT ${SRCS})
|
||||
else()
|
||||
add_library(glad ${SRCS})
|
||||
endif()
|
||||
|
||||
target_include_directories(glad PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
target_include_directories(glad INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
target_link_libraries(glad PRIVATE Threads::Threads "${CMAKE_DL_LIBS}")
|
||||
@ -14,8 +20,7 @@ else()
|
||||
target_sources(glad PRIVATE src/glad_egl.c)
|
||||
target_link_libraries(glad PRIVATE EGL::EGL)
|
||||
endif()
|
||||
if(USE_GLX)
|
||||
if(SUPPORTS_X11)
|
||||
target_sources(glad PRIVATE src/glad_glx.c)
|
||||
target_link_options(glad PRIVATE OpenGL::GLX)
|
||||
endif()
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user