Commit 2fdbbd7a authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Fixed androidsupport lib generation with NDK 16

parent c0ad2e30
......@@ -21,20 +21,17 @@
############################################################################
cmake_minimum_required(VERSION 3.0)
project(androidsupport LANGUAGES C)
project(androidsupport LANGUAGES CXX)
include(GNUInstallDirs)
set(SUPPORT_SOURCES
"${CMAKE_ANDROID_NDK}/sources/android/support/src/musl-multibyte/wctomb.c"
"${CMAKE_ANDROID_NDK}/sources/android/support/src/iswblank.cpp"
)
add_library(support STATIC ${SUPPORT_SOURCES})
target_include_directories(support PUBLIC "${CMAKE_ANDROID_NDK}/sources/android/support/include")
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options(support PRIVATE "-std=c99")
endif()
install(TARGETS support
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
......@@ -42,11 +39,3 @@ install(TARGETS support
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
install(FILES
"${CMAKE_ANDROID_NDK}/sources/android/support/include/ctype.h"
"${CMAKE_ANDROID_NDK}/sources/android/support/include/langinfo.h"
"${CMAKE_ANDROID_NDK}/sources/android/support/include/nl_types.h"
"${CMAKE_ANDROID_NDK}/sources/android/support/include/xlocale.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
endif()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment