From 4719f3c1147a965955bf8571d143e1e5f6c34ed0 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sat, 17 Apr 2021 17:30:45 +0200 Subject: [PATCH] Fix Android build (again) closes #27 --- CMakeLists.txt | 2 +- source/Irrlicht/CMakeLists.txt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eaa5716f..5adbb4f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ add_subdirectory(source/Irrlicht) # Installation of library and headers. include(GNUInstallDirs) -install(TARGETS IrrlichtMt +install(TARGETS ${INSTALL_TARGETS} EXPORT IrrlichtMt-export DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) diff --git a/source/Irrlicht/CMakeLists.txt b/source/Irrlicht/CMakeLists.txt index f8bf8196..d709546b 100644 --- a/source/Irrlicht/CMakeLists.txt +++ b/source/Irrlicht/CMakeLists.txt @@ -401,3 +401,9 @@ set_target_properties(IrrlichtMt PROPERTIES if(WIN32) set_target_properties(IrrlichtMt PROPERTIES PREFIX "") # for DLL name endif() + +if(ANDROID) + set(INSTALL_TARGETS IrrlichtMt native_app_glue PARENT_SCOPE) +else() + set(INSTALL_TARGETS IrrlichtMt PARENT_SCOPE) +endif()