You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
install(FILES AbstractContext.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts)
|
|
|
|
|
|
|
|
|
|
# GLUT context
|
|
|
|
|
if(NOT TARGET_GLES)
|
|
|
|
|
find_package(GLUT)
|
|
|
|
|
if(GLUT_FOUND)
|
|
|
|
|
add_library(MagnumGlutContext STATIC GlutContext.cpp)
|
|
|
|
|
install(FILES GlutContext.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts)
|
|
|
|
|
install(TARGETS MagnumGlutContext DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})
|
|
|
|
|
else()
|
|
|
|
|
message(WARNING "GLUT library was not found. GLUT context library will not be generated.")
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# SDL2 context
|
|
|
|
|
find_package(SDL2)
|
|
|
|
|
if(SDL2_FOUND)
|
|
|
|
|
include_directories(${SDL2_INCLUDE_DIR})
|
|
|
|
|
add_library(MagnumSdl2Context STATIC Sdl2Context.cpp)
|
|
|
|
|
install(FILES Sdl2Context.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts)
|
|
|
|
|
install(TARGETS MagnumSdl2Context DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})
|
|
|
|
|
else()
|
|
|
|
|
message(WARNING "SDL2 library was not found. SDL2 context library will not be generated.")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# X/EGL context
|
|
|
|
|
find_package(OpenGLES2)
|
|
|
|
|
find_package(EGL)
|
|
|
|
|
find_package(X11)
|
|
|
|
|
if(OPENGLES2_FOUND AND EGL_FOUND AND X11_FOUND)
|
|
|
|
|
add_library(MagnumEglContext STATIC EglContext.cpp)
|
|
|
|
|
install(FILES EglContext.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts)
|
|
|
|
|
install(TARGETS MagnumEglContext DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})
|
|
|
|
|
else()
|
|
|
|
|
message(WARNING "OpenGL ES 2, EGL or X11 libraries were not found. EGL context library will not be generated.")
|
|
|
|
|
endif()
|