diff --git a/include/crow/json.h b/include/crow/json.h index 3359a9cc0..d0a2138c0 100644 --- a/include/crow/json.h +++ b/include/crow/json.h @@ -1675,7 +1675,7 @@ namespace crow } else { -#if defined(__APPLE__) || defined(__MACH__) || defined(__FreeBSD__) +#if defined(__APPLE__) || defined(__MACH__) || defined(__FreeBSD__) || defined(__ANDROID__) o = std::unique_ptr(new object(value)); #else (*o) = value; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b895a79a6..41c9b2aa8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -11,6 +11,10 @@ add_executable(unittest ${TEST_SRCS}) target_link_libraries(unittest Crow::Crow) add_warnings_optimizations(unittest) +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Android") + target_link_libraries(unittest log) +endif() + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set_target_properties(unittest PROPERTIES COMPILE_FLAGS "--coverage -fprofile-arcs -ftest-coverage") target_link_libraries(unittest gcov) diff --git a/tests/ssl/CMakeLists.txt b/tests/ssl/CMakeLists.txt index 07c6c5e36..5c240ad78 100644 --- a/tests/ssl/CMakeLists.txt +++ b/tests/ssl/CMakeLists.txt @@ -11,6 +11,10 @@ add_executable(ssltest ${TEST_SRCS}) target_link_libraries(ssltest Crow::Crow) add_warnings_optimizations(ssltest) +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Android") + target_link_libraries(ssltest log) +endif() + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set_target_properties(ssltest PROPERTIES COMPILE_FLAGS "--coverage -fprofile-arcs -ftest-coverage") target_link_libraries(ssltest gcov)