Browse Source

More renaming: Context -> WindowContext.

pull/279/head
Vladimír Vondruš 14 years ago
parent
commit
ad19b2734b
  1. 8
      CMakeLists.txt
  2. 44
      src/Contexts/CMakeLists.txt

8
CMakeLists.txt

@ -15,10 +15,10 @@ option(WITH_PRIMITIVES "Builf Primitives library" OFF)
option(WITH_SCENEGRAPH "Build SceneGraph library" OFF) option(WITH_SCENEGRAPH "Build SceneGraph library" OFF)
option(WITH_SHADERS "Build Shaders library" OFF) option(WITH_SHADERS "Build Shaders library" OFF)
option(WITH_GLXCONTEXT "Build GlxContext library" OFF) option(WITH_GLXWINDOWCONTEXT "Build GlxWindowContext library" OFF)
cmake_dependent_option(WITH_XEGLCONTEXT "Build XEglContext library" OFF "TARGET_GLES" OFF) cmake_dependent_option(WITH_XEGLWINDOWCONTEXT "Build XEglWindowContext library" OFF "TARGET_GLES" OFF)
cmake_dependent_option(WITH_GLUTCONTEXT "Build GlutContext library" OFF "NOT TARGET_GLES" OFF) cmake_dependent_option(WITH_GLUTWINDOWCONTEXT "Build GlutWindowContext library" OFF "NOT TARGET_GLES" OFF)
option(WITH_SDL2CONTEXT "Build Sdl2Context library" OFF) option(WITH_SDL2WINDOWCONTEXT "Build Sdl2WindowContext library" OFF)
option(BUILD_TESTS "Build unit tests." OFF) option(BUILD_TESTS "Build unit tests." OFF)

44
src/Contexts/CMakeLists.txt

@ -7,8 +7,8 @@ set(MagnumContexts_HEADERS
ExtensionWrangler.h) ExtensionWrangler.h)
install(FILES ${MagnumContexts_HEADERS} DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts) install(FILES ${MagnumContexts_HEADERS} DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts)
# GLUT context # GLUT window context
if(WITH_GLUTCONTEXT) if(WITH_GLUTWINDOWCONTEXT)
find_package(GLUT) find_package(GLUT)
if(GLUT_FOUND) if(GLUT_FOUND)
add_library(MagnumGlutWindowContext STATIC add_library(MagnumGlutWindowContext STATIC
@ -17,12 +17,12 @@ if(WITH_GLUTCONTEXT)
install(FILES GlutWindowContext.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts) install(FILES GlutWindowContext.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts)
install(TARGETS MagnumGlutWindowContext DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) install(TARGETS MagnumGlutWindowContext DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})
else() else()
message(FATAL_ERROR "GLUT library, required by GlutWindowContext, was not found. Set WITH_GLUTCONTEXT to OFF to skip building it.") message(FATAL_ERROR "GLUT library, required by GlutWindowContext, was not found. Set WITH_GLUTWINDOWCONTEXT to OFF to skip building it.")
endif() endif()
endif() endif()
# SDL2 context # SDL2 window context
if(WITH_SDL2CONTEXT) if(WITH_SDL2WINDOWCONTEXT)
find_package(SDL2) find_package(SDL2)
if(SDL2_FOUND) if(SDL2_FOUND)
include_directories(${SDL2_INCLUDE_DIR}) include_directories(${SDL2_INCLUDE_DIR})
@ -32,14 +32,14 @@ if(WITH_SDL2CONTEXT)
install(FILES Sdl2WindowContext.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts) install(FILES Sdl2WindowContext.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts)
install(TARGETS MagnumSdl2WindowContext DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) install(TARGETS MagnumSdl2WindowContext DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})
else() else()
message(FATAL_ERROR "SDL2 library, required by Sdl2WindowContext, was not found. Set WITH_SDL2CONTEXT to OFF to skip building it.") message(FATAL_ERROR "SDL2 library, required by Sdl2WindowContext, was not found. Set WITH_SDL2WINDOWCONTEXT to OFF to skip building it.")
endif() endif()
endif() endif()
# GLX context # GLX window context
if(WITH_GLXCONTEXT) if(WITH_GLXWINDOWCONTEXT)
set(NEED_ABSTRACTXCONTEXT 1) set(NEED_ABSTRACTXWINDOWCONTEXT 1)
set(NEED_GLXINTERFACE 1) set(NEED_GLXCONTEXT 1)
add_library(MagnumGlxWindowContext STATIC add_library(MagnumGlxWindowContext STATIC
$<TARGET_OBJECTS:MagnumAbstractXWindowContext> $<TARGET_OBJECTS:MagnumAbstractXWindowContext>
$<TARGET_OBJECTS:MagnumGlxContext> $<TARGET_OBJECTS:MagnumGlxContext>
@ -48,10 +48,10 @@ if(WITH_GLXCONTEXT)
install(TARGETS MagnumGlxWindowContext DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) install(TARGETS MagnumGlxWindowContext DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})
endif() endif()
# X/EGL context # X/EGL window context
if(WITH_XEGLCONTEXT) if(WITH_XEGLWINDOWCONTEXT)
set(NEED_ABSTRACTXCONTEXT 1) set(NEED_ABSTRACTXWINDOWCONTEXT 1)
set(NEED_EGLINTERFACE 1) set(NEED_EGLCONTEXT 1)
add_library(MagnumXEglWindowContext STATIC add_library(MagnumXEglWindowContext STATIC
$<TARGET_OBJECTS:MagnumAbstractXWindowContext> $<TARGET_OBJECTS:MagnumAbstractXWindowContext>
$<TARGET_OBJECTS:MagnumEglContext> $<TARGET_OBJECTS:MagnumEglContext>
@ -60,11 +60,11 @@ if(WITH_XEGLCONTEXT)
install(TARGETS MagnumXEglWindowContext DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) install(TARGETS MagnumXEglWindowContext DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})
endif() endif()
# Abstract X context # Abstract X window context
if(NEED_ABSTRACTXCONTEXT) if(NEED_ABSTRACTXWINDOWCONTEXT)
find_package(X11) find_package(X11)
if(NOT X11_FOUND) if(NOT X11_FOUND)
message(FATAL_ERROR "X11 library, required by some contexts, was not found. Set WITH_*X*CONTEXT to OFF to skip building them.") message(FATAL_ERROR "X11 library, required by some contexts, was not found. Set WITH_*X*WINDOWCONTEXT to OFF to skip building them.")
endif() endif()
add_library(MagnumAbstractXWindowContext OBJECT AbstractXWindowContext.cpp) add_library(MagnumAbstractXWindowContext OBJECT AbstractXWindowContext.cpp)
# X11 macros are a mess, disable warnings for C-style casts # X11 macros are a mess, disable warnings for C-style casts
@ -72,19 +72,19 @@ if(NEED_ABSTRACTXCONTEXT)
install(FILES AbstractXWindowContext.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts) install(FILES AbstractXWindowContext.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts)
endif() endif()
# GLX interface # GLX window context
if(NEED_GLXINTERFACE) if(NEED_GLXCONTEXT)
add_library(MagnumGlxContext OBJECT GlxContext.cpp) add_library(MagnumGlxContext OBJECT GlxContext.cpp)
# X11 macros are a mess, disable warnings for C-style casts # X11 macros are a mess, disable warnings for C-style casts
set_target_properties(MagnumGlxContext PROPERTIES COMPILE_FLAGS "-Wno-old-style-cast") set_target_properties(MagnumGlxContext PROPERTIES COMPILE_FLAGS "-Wno-old-style-cast")
install(FILES GlxContext.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts) install(FILES GlxContext.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts)
endif() endif()
# EGL interface # EGL context
if(NEED_EGLINTERFACE) if(NEED_EGLCONTEXT)
find_package(EGL) find_package(EGL)
if(NOT EGL_FOUND) if(NOT EGL_FOUND)
message(FATAL_ERROR "EGL library, required by some contexts, was not found. Set WITH_*EGL*CONTEXT to OFF to skip building them.") message(FATAL_ERROR "EGL library, required by some window contexts, was not found. Set WITH_*EGL*WINDOWCONTEXT to OFF to skip building them.")
endif() endif()
add_library(MagnumEglContext OBJECT EglContext.cpp) add_library(MagnumEglContext OBJECT EglContext.cpp)
# X11 macros are a mess, disable warnings for C-style casts # X11 macros are a mess, disable warnings for C-style casts

Loading…
Cancel
Save