Browse Source

Platform: build magnum-info on Windows/EGL too.

pull/110/head
Vladimír Vondruš 11 years ago
parent
commit
ad342ab18f
  1. 2
      CMakeLists.txt
  2. 6
      src/Magnum/Platform/CMakeLists.txt
  3. 4
      src/Magnum/Platform/magnum-info.cpp

2
CMakeLists.txt

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

6
src/Magnum/Platform/CMakeLists.txt

@ -557,7 +557,11 @@ if(WITH_MAGNUMINFO)
elseif(CORRADE_TARGET_UNIX)
target_link_libraries(magnum-info MagnumWindowlessGlxApplication)
elseif(CORRADE_TARGET_WINDOWS)
target_link_libraries(magnum-info MagnumWindowlessWglApplication)
if(NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES)
target_link_libraries(magnum-info MagnumWindowlessWglApplication)
else()
target_link_libraries(magnum-info MagnumWindowlessWindowsEglApplication)
endif()
else()
message(FATAL_ERROR "magnum-info is not available on this platform. Set WITH_MAGNUMINFO to OFF to skip building it.")
endif()

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

@ -63,8 +63,12 @@
#elif defined(CORRADE_TARGET_UNIX)
#include "Magnum/Platform/WindowlessGlxApplication.h"
#elif defined(CORRADE_TARGET_WINDOWS)
#if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_DESKTOP_GLES)
#include "Magnum/Platform/WindowlessWglApplication.h"
#else
#include "Magnum/Platform/WindowlessWindowsEglApplication.h"
#endif
#else
#error no windowless application available on this platform
#endif

Loading…
Cancel
Save