diff --git a/CMakeLists.txt b/CMakeLists.txt index fe81fa60..62a2c93b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -204,6 +204,14 @@ if(SPDLOG_FMT_EXTERNAL OR SPDLOG_FMT_EXTERNAL_HO) set(PKG_CONFIG_REQUIRES fmt) # add dependency to pkg-config endif() +# --------------------------------------------------------------------------------------- +# Add required libraries for Android CMake build +# --------------------------------------------------------------------------------------- +if (ANDROID) + target_link_libraries(spdlog PUBLIC log) + target_link_libraries(spdlog_header_only INTERFACE log) +endif () + # --------------------------------------------------------------------------------------- # Misc definitions according to tweak options # ---------------------------------------------------------------------------------------