From 60b6889ca634e583182e4881386c08761a2e4ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 4 Jun 2016 21:45:57 +0200 Subject: [PATCH] Platform: disable hidden visibility for Android Native App Glue. Otherwise the ANativeActivity_onCreate() won't get exported and the app will fail to start. Of course they just don't care and produce crappy code that apparently nobody uses in production environment. --- src/Magnum/Platform/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Magnum/Platform/CMakeLists.txt b/src/Magnum/Platform/CMakeLists.txt index 2eec28899..a28050001 100644 --- a/src/Magnum/Platform/CMakeLists.txt +++ b/src/Magnum/Platform/CMakeLists.txt @@ -75,6 +75,10 @@ if(WITH_ANDROIDAPPLICATION) ${MagnumAndroidApplication_HEADERS} ${MagnumAndroidApplication_PRIVATE_HEADERS} ${ANDROID_NATIVE_APP_GLUE_SRC}) + # They just don't care, so of course the ANativeActivity_onCreate() + # function is not exported and thus the app startup fails if I don't + # disable hidden visibility for the file. + set_source_files_properties(${ANDROID_NATIVE_APP_GLUE_SRC} PROPERTIES COMPILE_FLAGS "-fvisibility=default") target_include_directories(MagnumAndroidApplication PUBLIC ${ANDROID_NATIVE_APP_GLUE_INCLUDE_DIR}) set_target_properties(MagnumAndroidApplication PROPERTIES DEBUG_POSTFIX "-d") # Assuming that PIC is not needed because the Application lib is always