Browse Source

Platform: enable magnum-info on Windows.

pull/54/head
Vladimír Vondruš 12 years ago
parent
commit
8e1e8ee30e
  1. 4
      CMakeLists.txt
  2. 2
      src/Magnum/Platform/CMakeLists.txt
  3. 9
      src/Magnum/Platform/magnum-info.cpp

4
CMakeLists.txt

@ -75,8 +75,8 @@ if(NOT CORRADE_TARGET_NACL AND NOT CORRADE_TARGET_ANDROID)
option(WITH_SDL2APPLICATION "Build Sdl2Application library" OFF)
endif()
# Magnum Info (currently only using GLX or NaCl)
if((CORRADE_TARGET_UNIX AND NOT APPLE) OR CORRADE_TARGET_NACL)
# Magnum Info (currently only using GLX or WGL or on NaCl)
if((CORRADE_TARGET_UNIX AND NOT APPLE) OR CORRADE_TARGET_NACL OR CORRADE_TARGET_WINDOWS)
option(WITH_MAGNUMINFO "Build magnum-info utility" OFF)
endif()

2
src/Magnum/Platform/CMakeLists.txt

@ -226,6 +226,8 @@ if(WITH_MAGNUMINFO)
target_link_libraries(magnum-info MagnumWindowlessGlxApplication ${X11_LIBRARIES})
elseif(CORRADE_TARGET_NACL)
target_link_libraries(magnum-info MagnumWindowlessNaClApplication ppapi_cpp ppapi)
elseif(CORRADE_TARGET_WINDOWS)
target_link_libraries(magnum-info MagnumWindowlessWglApplication)
else()
message(FATAL_ERROR "magnum-info is not available on this platform. Set WITH_MAGNUMINFO to OFF to skip building it.")
endif()

9
src/Magnum/Platform/magnum-info.cpp

@ -50,10 +50,15 @@
#ifndef MAGNUM_TARGET_GLES2
#include "Magnum/TextureArray.h"
#endif
#ifndef CORRADE_TARGET_NACL
#ifdef CORRADE_TARGET_NACL
#include "Magnum/Platform/WindowlessNaClApplication.h"
#elif defined(CORRADE_TARGET_UNIX)
#include "Magnum/Platform/WindowlessGlxApplication.h"
#elif defined(CORRADE_TARGET_WINDOWS)
#include "Magnum/Platform/WindowlessWglApplication.h"
#else
#include "Magnum/Platform/WindowlessNaClApplication.h"
#error No windowless application available on this platform
#endif
namespace Magnum {

Loading…
Cancel
Save