File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed
Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 1+ cmake --build . --target clean
2+ rm CMakeCache.txt
3+ cmake -B build-android -G Ninja \
4+ -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME /build/cmake/android.toolchain.cmake \
5+ -DANDROID_ABI=arm64-v8a \
6+ -DANDROID_PLATFORM=android-30 \
7+ -DCMAKE_BUILD_TYPE=Release
8+ cmake --build build-android --config Release
Original file line number Diff line number Diff line change 1414
1515namespace bux {
1616
17- #ifndef __APPLE__
17+ #if !defined( __APPLE__) && !defined(__ANDROID__)
1818using T_LocalZone = const std::chrono::time_zone *;
1919inline T_LocalZone local_zone () { return std::chrono::get_tzdb ().current_zone (); }
2020#define LOCALZONE_IS_TIMEZONE (1 )
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ add_library(bux STATIC
1616 )
1717target_include_directories (bux PRIVATE ../include /bux)
1818target_compile_features (bux PRIVATE cxx_std_23)
19+ if (${CMAKE_SYSTEM_NAME} STREQUAL "Android" )
20+ target_compile_options (bux PUBLIC -fPIC)
21+ endif ()
1922#target_compile_options(bux PRIVATE -g -O0)
2023if (Iconv_FOUND)
2124target_link_libraries (bux Iconv::Iconv)
Original file line number Diff line number Diff line change 66#include < cstring> // strstr(), strlen()
77#ifdef _WIN32
88 #include < processenv.h> // ExpandEnvironmentStringsA()
9- #elif defined(__unix__) || defined(__unix) || defined(__gnu_linux__)
9+ #elif ! defined(__ANDROID__) && (defined( __unix__) || defined(__unix) || defined(__gnu_linux__) )
1010 #include < wordexp.h> // wordexp(), wordfree()
1111#else
1212 #define DISABLE_EXPAND_ENV_
1313#endif
1414#ifdef __unix__
15- #include < cxxabi.h> // abi::__cxa_demangle()
15+ #include < cstdlib> // free()
16+ #include < cxxabi.h> // abi::__cxa_demangle()
1617#endif
1718
1819
You can’t perform that action at this time.
0 commit comments