From 97dbd9a19149b4d71bf375d3354be6eccaa92f7b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 3 Feb 2022 00:27:48 -0800 Subject: Don't search for __android_log_print on non-Android targets For some reason this check is passing on iOS, causing the build to later fail because it can't find -llog. Need to investigate why it finds something that doesn't exist, but this should fix the build error in the mean time. --- CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d396e547..3a8ae9b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -204,11 +204,13 @@ else() endif() unset(OLD_REQUIRED_LIBRARIES) -# Include liblog for Android logging -check_library_exists(log __android_log_print "" HAVE_LIBLOG) -if(HAVE_LIBLOG) - set(EXTRA_LIBS log ${EXTRA_LIBS}) - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} log) +if(ANDROID) + # Include liblog for Android logging + check_library_exists(log __android_log_print "" HAVE_LIBLOG) + if(HAVE_LIBLOG) + set(EXTRA_LIBS log ${EXTRA_LIBS}) + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} log) + endif() endif() if(MSVC) -- cgit v1.2.3