From bd8d807e1c7a1611bd744aad07da8d16b4b6b9e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 5 Dec 2016 12:41:15 +0100 Subject: [PATCH] Make Linux/Windows code for windowless apps on ES more consistent. --- src/Magnum/Platform/CMakeLists.txt | 6 +++--- src/Magnum/Platform/magnum-info.cpp | 6 +++--- src/Magnum/Text/CMakeLists.txt | 6 +++--- src/Magnum/Text/fontconverter.cpp | 6 +++--- src/Magnum/TextureTools/CMakeLists.txt | 6 +++--- src/Magnum/TextureTools/distancefieldconverter.cpp | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Magnum/Platform/CMakeLists.txt b/src/Magnum/Platform/CMakeLists.txt index b48883ac8..1126680ea 100644 --- a/src/Magnum/Platform/CMakeLists.txt +++ b/src/Magnum/Platform/CMakeLists.txt @@ -758,10 +758,10 @@ if(WITH_MAGNUMINFO) target_link_libraries(magnum-info MagnumWindowlessGlxApplication) endif() elseif(CORRADE_TARGET_WINDOWS) - if(NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES) - target_link_libraries(magnum-info MagnumWindowlessWglApplication) - else() + if(MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_DESKTOP_GLES) target_link_libraries(magnum-info MagnumWindowlessWindowsEglApplication) + else() + target_link_libraries(magnum-info MagnumWindowlessWglApplication) endif() else() message(FATAL_ERROR "magnum-info is not available on this platform. Set WITH_MAGNUMINFO to OFF to skip building it.") diff --git a/src/Magnum/Platform/magnum-info.cpp b/src/Magnum/Platform/magnum-info.cpp index 630a6c81e..18ca2416a 100644 --- a/src/Magnum/Platform/magnum-info.cpp +++ b/src/Magnum/Platform/magnum-info.cpp @@ -72,10 +72,10 @@ #include "Magnum/Platform/WindowlessGlxApplication.h" #endif #elif defined(CORRADE_TARGET_WINDOWS) -#if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_DESKTOP_GLES) -#include "Magnum/Platform/WindowlessWglApplication.h" -#else +#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_DESKTOP_GLES) #include "Magnum/Platform/WindowlessWindowsEglApplication.h" +#else +#include "Magnum/Platform/WindowlessWglApplication.h" #endif #else #error no windowless application available on this platform diff --git a/src/Magnum/Text/CMakeLists.txt b/src/Magnum/Text/CMakeLists.txt index 5190538b4..72640049d 100644 --- a/src/Magnum/Text/CMakeLists.txt +++ b/src/Magnum/Text/CMakeLists.txt @@ -78,10 +78,10 @@ if(WITH_FONTCONVERTER) target_link_libraries(magnum-fontconverter MagnumWindowlessGlxApplication) endif() elseif(CORRADE_TARGET_WINDOWS) - if(NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES) - target_link_libraries(magnum-fontconverter MagnumWindowlessWglApplication) - else() + if(MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_DESKTOP_GLES) target_link_libraries(magnum-fontconverter MagnumWindowlessWindowsEglApplication) + else() + target_link_libraries(magnum-fontconverter MagnumWindowlessWglApplication) endif() else() message(FATAL_ERROR "magnum-fontconverter is not available on this platform. Set WITH_FONTCONVERTER to OFF to suppress this warning.") diff --git a/src/Magnum/Text/fontconverter.cpp b/src/Magnum/Text/fontconverter.cpp index 5482b47f5..fdb6fbf05 100644 --- a/src/Magnum/Text/fontconverter.cpp +++ b/src/Magnum/Text/fontconverter.cpp @@ -47,10 +47,10 @@ #include "Magnum/Platform/WindowlessGlxApplication.h" #endif #elif defined(CORRADE_TARGET_WINDOWS) -#if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_DESKTOP_GLES) -#include "Magnum/Platform/WindowlessWglApplication.h" -#else +#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_DESKTOP_GLES) #include "Magnum/Platform/WindowlessWindowsEglApplication.h" +#else +#include "Magnum/Platform/WindowlessWglApplication.h" #endif #else #error no windowless application available on this platform diff --git a/src/Magnum/TextureTools/CMakeLists.txt b/src/Magnum/TextureTools/CMakeLists.txt index 883ed4c87..a87c12540 100644 --- a/src/Magnum/TextureTools/CMakeLists.txt +++ b/src/Magnum/TextureTools/CMakeLists.txt @@ -68,10 +68,10 @@ if(WITH_DISTANCEFIELDCONVERTER) target_link_libraries(magnum-distancefieldconverter MagnumWindowlessGlxApplication) endif() elseif(CORRADE_TARGET_WINDOWS) - if(NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES) - target_link_libraries(magnum-distancefieldconverter MagnumWindowlessWglApplication) - else() + if(MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_DESKTOP_GLES) target_link_libraries(magnum-distancefieldconverter MagnumWindowlessWindowsEglApplication) + else() + target_link_libraries(magnum-distancefieldconverter MagnumWindowlessWglApplication) endif() else() message(FATAL_ERROR "magnum-distancefieldconverter is not available on this platform. Set WITH_DISTANCEFIELDCONVERTER to OFF to suppress this warning.") diff --git a/src/Magnum/TextureTools/distancefieldconverter.cpp b/src/Magnum/TextureTools/distancefieldconverter.cpp index 45a042aa1..ce04209db 100644 --- a/src/Magnum/TextureTools/distancefieldconverter.cpp +++ b/src/Magnum/TextureTools/distancefieldconverter.cpp @@ -53,10 +53,10 @@ #include "Magnum/Platform/WindowlessGlxApplication.h" #endif #elif defined(CORRADE_TARGET_WINDOWS) -#if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_DESKTOP_GLES) -#include "Magnum/Platform/WindowlessWglApplication.h" -#else +#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_DESKTOP_GLES) #include "Magnum/Platform/WindowlessWindowsEglApplication.h" +#else +#include "Magnum/Platform/WindowlessWglApplication.h" #endif #else #error no windowless application available on this platform