From 5e36f651494cc6e1c9bd642dad985a5d3951701e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 18 Nov 2018 19:20:43 +0100 Subject: [PATCH] Platform: properly link all dependencies of AndroidApplication. --- doc/changelog.dox | 5 +++++ src/Magnum/Platform/CMakeLists.txt | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/changelog.dox b/doc/changelog.dox index 1c2c59d28..6fddf7cf5 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -86,6 +86,11 @@ r>>) compared to before. It's now also possible to reuse the internal state for batch processing. +@subsection changelog-latest-buildsystem Build system + +- The `Magnum::AndroidApplication` target was missing a few dependency + libraries when Magnum was used as a CMake subproject + @subsection changelog-latest-bugfixes Bug fixes - Fixed @ref Platform::Sdl2Application and @ref Platform::GlfwApplication to diff --git a/src/Magnum/Platform/CMakeLists.txt b/src/Magnum/Platform/CMakeLists.txt index 4326097ac..cc37ce636 100644 --- a/src/Magnum/Platform/CMakeLists.txt +++ b/src/Magnum/Platform/CMakeLists.txt @@ -72,6 +72,7 @@ if(WITH_ANDROIDAPPLICATION) message(FATAL_ERROR "AndroidApplication is available only when targeting Android. Set WITH_ANDROIDAPPLICATION to OFF to skip building it.") endif() + find_package(EGL REQUIRED) set(NEED_EGLCONTEXT 1) set(MagnumAndroidApplication_SRCS @@ -101,7 +102,10 @@ if(WITH_ANDROIDAPPLICATION) FOLDER "Magnum/Platform") # Assuming that PIC is not needed because the Application lib is always # linked to the executable and not to any intermediate shared lib - target_link_libraries(MagnumAndroidApplication PUBLIC MagnumGL) + target_link_libraries(MagnumAndroidApplication PUBLIC + MagnumGL + android + EGL::EGL) install(FILES ${MagnumAndroidApplication_HEADERS} DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Platform) install(TARGETS MagnumAndroidApplication