monado/src/xrt/auxiliary/ogl/CMakeLists.txt

31 lines
670 B
CMake
Raw Normal View History

# Copyright 2019-2022, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
add_library(
aux_ogl STATIC
ogl_documentation.h
ogl_api.c
ogl_api.h
ogl_helpers.c
ogl_helpers.h
)
target_link_libraries(aux_ogl PUBLIC aux-includes xrt-external-glad)
if(XRT_HAVE_OPENGL_GLX AND XRT_HAVE_XLIB)
target_sources(aux_ogl PRIVATE glx_api.c glx_api.h)
endif()
if(XRT_HAVE_EGL)
target_sources(aux_ogl PRIVATE egl_api.c egl_api.h)
endif()
2022-10-22 22:06:41 +00:00
# Only needed on Android
if(ANDROID AND XRT_HAVE_OPENGLES)
target_link_libraries(aux_ogl PUBLIC EGL::EGL)
endif()
2021-10-15 21:16:59 +00:00
if(WIN32)
target_sources(aux_ogl PRIVATE wgl_api.c wgl_api.h)
target_link_libraries(aux_ogl PUBLIC OpenGL::GL)
endif()