diff --git a/CMakeLists.txt b/CMakeLists.txt index 74dbfe3ca..a3f06d528 100644 --- a/CMakeLists.txt +++ b/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() diff --git a/src/Magnum/Platform/CMakeLists.txt b/src/Magnum/Platform/CMakeLists.txt index 401244d6e..1597e2204 100644 --- a/src/Magnum/Platform/CMakeLists.txt +++ b/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() diff --git a/src/Magnum/Platform/magnum-info.cpp b/src/Magnum/Platform/magnum-info.cpp index 3930c0eb9..1f61d915d 100644 --- a/src/Magnum/Platform/magnum-info.cpp +++ b/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 {