diff options
author | Chris Robinson <[email protected]> | 2017-01-26 18:05:34 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-01-26 18:15:19 -0800 |
commit | 3ba03c5a29bcebb1866f36555957c3c293a99962 (patch) | |
tree | bcd8da10ec0ce4d71a8ea5dce7c5815a29a2834c /CMakeLists.txt | |
parent | f0c8b7f255b17a2fcfcf622a78794cde07f033cd (diff) |
Also log to __android_log_print on Android
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e608146..690ec37a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,6 +213,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) +ENDIF() + # Check if we have C99 variable length arrays CHECK_C_SOURCE_COMPILES( "int main(int argc, char *argv[]) |