From 179d4e04713de59dfc5113f6e9823c3c418652ee Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Wed, 7 Feb 2018 09:48:48 +0100 Subject: [PATCH] cmake: install tinyxml2 library for Android This hack is needed because otherwise the tinyxml2 library gets installed in a library directory that does not respect the ANDROID_ABI. --- core/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 97487a7ee4..f512ae1a7e 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -18,6 +18,18 @@ if(IOS OR MSVC OR APPLE) elseif(ANDROID) # We need tinyxml2 for the camera definition parsing. add_subdirectory(third_party/tinyxml2 EXCLUDE_FROM_ALL) + # We install the tinyxml2 library manually. + if (CMAKE_BUILD_TYPE STREQUAL "Debug") + # Need to remove that d again. + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/third_party/tinyxml2/libtinyxml2d.so + DESTINATION ${lib_path} + RENAME libtinyxml2.so + ) + else() + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/third_party/tinyxml2/libtinyxml2.so + DESTINATION ${lib_path} + ) + endif() endif() add_library(dronecore ${library_type}