aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-02-03 00:27:48 -0800
committerChris Robinson <[email protected]>2022-02-03 00:27:48 -0800
commit97dbd9a19149b4d71bf375d3354be6eccaa92f7b (patch)
treebaf2c97b904d6f2a4c1b4d8e9ea17f1e12f0a2a3 /CMakeLists.txt
parenta98a76c4e038c6dc53fb8d4d3caca5af21d436d3 (diff)
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files 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)