mirror of https://github.com/mosra/magnum.git
40 changed files with 602 additions and 210 deletions
@ -1,36 +1,39 @@
|
||||
install(FILES AbstractContext.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts) |
||||
|
||||
# GLUT context |
||||
if(NOT TARGET_GLES) |
||||
if(WITH_GLUTCONTEXT) |
||||
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.") |
||||
message(FATAL_ERROR "GLUT library, required by GlutContext, was not found. Set WITH_GLUTCONTEXT to OFF to skip building it.") |
||||
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.") |
||||
if(WITH_SDL2CONTEXT) |
||||
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(FATAL_ERROR "SDL2 library, required by Sdl2Context, was not found. Set WITH_SDL2CONTEXT to OFF to skip building it.") |
||||
endif() |
||||
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.") |
||||
if(WITH_EGLCONTEXT) |
||||
find_package(EGL) |
||||
find_package(X11) |
||||
if(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(FATAL_ERROR "EGL or X11 libraries, required by EglContext, were not found. Set WITH_EGLCONTEXT to OFF to skip building it.") |
||||
endif() |
||||
endif() |
||||
|
||||
@ -1,11 +1,15 @@
|
||||
corrade_add_resource(Shaders MagnumShaders PhongShader.frag PhongShader.vert) |
||||
set(Shaders_SRCS |
||||
corrade_add_resource(MagnumShaders_RCS MagnumShaders PhongShader.frag PhongShader.vert) |
||||
set(MagnumShaders_SRCS |
||||
PhongShader.cpp |
||||
${Shaders} |
||||
) |
||||
${MagnumShaders_RCS}) |
||||
set(MagnumShaders_HEADERS |
||||
PhongShader.h |
||||
|
||||
add_library(MagnumShaders SHARED ${Shaders_SRCS}) |
||||
magnumShadersVisibility.h) |
||||
|
||||
add_library(MagnumShaders SHARED ${MagnumShaders_SRCS}) |
||||
|
||||
target_link_libraries(MagnumShaders Magnum) |
||||
|
||||
install(TARGETS MagnumShaders DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) |
||||
install(FILES ${MagnumShaders_HEADERS} DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Shaders) |
||||
|
||||
@ -0,0 +1,13 @@
|
||||
set(MagnumTrade_HEADERS |
||||
AbstractImporter.h |
||||
AbstractMaterialData.h |
||||
CameraData.h |
||||
ImageData.h |
||||
LightData.h |
||||
MeshData.h |
||||
MeshObjectData.h |
||||
ObjectData.h |
||||
PhongMaterialData.h |
||||
SceneData.h |
||||
TextureData.h) |
||||
install(FILES ${MagnumTrade_HEADERS} DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Trade) |
||||
Loading…
Reference in new issue