diff --git a/CMakeLists.txt b/CMakeLists.txt index f2e221968..5a729ff29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -178,7 +178,7 @@ if(BUILD_TESTS) endif() # OpenGLTester library, built by default only if GL tests are enabled -if(NOT CORRADE_TARGET_ANDROID AND NOT CORRADE_TARGET_EMSCRIPTEN) +if(NOT CORRADE_TARGET_EMSCRIPTEN) cmake_dependent_option(WITH_OPENGLTESTER "Build OpenGLTester library" OFF "NOT BUILD_GL_TESTS" ON) endif() @@ -226,7 +226,7 @@ if(CORRADE_TARGET_EMSCRIPTEN) endif() if(WITH_OPENGLTESTER) - if(MAGNUM_TARGET_HEADLESS) + if(MAGNUM_TARGET_HEADLESS OR CORRADE_TARGET_ANDROID) set(WITH_WINDOWLESSEGLAPPLICATION ON) set(OPENGLTESTER_APPLICATION MagnumWindowlessEglApplication) elseif(CORRADE_TARGET_IOS) diff --git a/package/archlinux/PKGBUILD-android-arm64 b/package/archlinux/PKGBUILD-android-arm64 index 651bb9fe0..99684dafc 100644 --- a/package/archlinux/PKGBUILD-android-arm64 +++ b/package/archlinux/PKGBUILD-android-arm64 @@ -37,6 +37,8 @@ build() { -DWITH_TGAIMPORTER=ON \ -DWITH_ANDROIDAPPLICATION=ON \ -DWITH_EGLCONTEXT=ON \ + -DWITH_WINDOWLESSEGLAPPLICATION=ON \ + -DWITH_MAGNUMINFO=ON \ -DBUILD_TESTS=ON ninja } diff --git a/src/Magnum/OpenGLTester.h b/src/Magnum/OpenGLTester.h index 5ec0b86ff..f17246c0e 100644 --- a/src/Magnum/OpenGLTester.h +++ b/src/Magnum/OpenGLTester.h @@ -34,7 +34,7 @@ #include "Magnum/Renderer.h" #include "Magnum/TimeQuery.h" -#ifdef MAGNUM_TARGET_HEADLESS +#if defined(MAGNUM_TARGET_HEADLESS) || defined(CORRADE_TARGET_ANDROID) #include "Magnum/Platform/WindowlessEglApplication.h" #elif defined(CORRADE_TARGET_IOS) #include "Magnum/Platform/WindowlessIosApplication.h" @@ -67,13 +67,12 @@ the base features. This class is available only on platforms with corresponding `Platform::Windowless*Application` implementation. That currently means all -platforms except @ref CORRADE_TARGET_ANDROID "Android" and -@ref CORRADE_TARGET_EMSCRIPTEN "Emscripten". It is built into a separate static -library and only if `WITH_OPENGLTESTER` is enabled when building Magnum. To use -it with CMake, you need to request the `OpenGLTester` component of the `Magnum` -package. Derive your test class from this class instead of -@ref Corrade::TestSuite::Tester and either link to `Magnum::OpenGLTester` -target or add it to the `LIBRARIES` section of the +platforms except @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten". It is built into +a separate static library and only if `WITH_OPENGLTESTER` is enabled when +building Magnum. To use it with CMake, you need to request the `OpenGLTester` +component of the `Magnum` package. Derive your test class from this class +instead of @ref Corrade::TestSuite::Tester and either link to +`Magnum::OpenGLTester` target or add it to the `LIBRARIES` section of the @ref corrade-cmake-add-test "corrade_add_test()" macro: @code{.cmake} diff --git a/src/Magnum/Platform/CMakeLists.txt b/src/Magnum/Platform/CMakeLists.txt index e00db7a28..f7eab5290 100644 --- a/src/Magnum/Platform/CMakeLists.txt +++ b/src/Magnum/Platform/CMakeLists.txt @@ -727,7 +727,7 @@ endif() if(WITH_MAGNUMINFO) add_executable(magnum-info info.cpp) target_link_libraries(magnum-info Magnum) - if(MAGNUM_TARGET_HEADLESS OR CORRADE_TARGET_EMSCRIPTEN) + if(MAGNUM_TARGET_HEADLESS OR CORRADE_TARGET_EMSCRIPTEN OR CORRADE_TARGET_ANDROID) target_link_libraries(magnum-info MagnumWindowlessEglApplication) elseif(CORRADE_TARGET_IOS) target_link_libraries(magnum-info MagnumWindowlessIosApplication) diff --git a/src/Magnum/Platform/WindowlessEglApplication.h b/src/Magnum/Platform/WindowlessEglApplication.h index fd8e906ae..ae570f008 100644 --- a/src/Magnum/Platform/WindowlessEglApplication.h +++ b/src/Magnum/Platform/WindowlessEglApplication.h @@ -184,8 +184,10 @@ class WindowlessEglContext::Configuration { Application for offscreen rendering using @ref WindowlessEglContext. This application library is in theory available for all platforms for which EGL -works (Linux desktop or ES, iOS and also @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten"). -See other `Windowless*Application` classes for an alternative. It is built if +works (Linux desktop or ES, @ref CORRADE_TARGET_IOS "iOS", +@ref CORRADE_TARGET_ANDROID "Android" and also +@ref CORRADE_TARGET_EMSCRIPTEN "Emscripten"). See other +`Windowless*Application` classes for an alternative. It is built if `WITH_WINDOWLESSEGLAPPLICATION` is enabled in CMake. @section Platform-WindowlessEglApplication-bootstrap Bootstrap application diff --git a/src/Magnum/Platform/info.cpp b/src/Magnum/Platform/info.cpp index 5a415a39e..63e34b7e6 100644 --- a/src/Magnum/Platform/info.cpp +++ b/src/Magnum/Platform/info.cpp @@ -56,7 +56,7 @@ #include "Magnum/TransformFeedback.h" #endif -#if defined(MAGNUM_TARGET_HEADLESS) || defined(CORRADE_TARGET_EMSCRIPTEN) +#if defined(MAGNUM_TARGET_HEADLESS) || defined(CORRADE_TARGET_EMSCRIPTEN) || defined(CORRADE_TARGET_ANDROID) #include "Magnum/Platform/WindowlessEglApplication.h" #elif defined(CORRADE_TARGET_IOS) #include "Magnum/Platform/WindowlessIosApplication.h"