From a2e28443f043886fbe8520e68c0e5c98a23f6080 Mon Sep 17 00:00:00 2001 From: Ahmed Yarub Hani Al Nuaimi Date: Mon, 22 Mar 2021 00:08:17 -0300 Subject: [PATCH] Add required libraries for Android CMake build --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d5d95934..2dc261ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -195,6 +195,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 # ---------------------------------------------------------------------------------------