8000 Merge pull request #544 from wilx/2.0.x · log4cplus/log4cplus@501a8b8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 501a8b8

Browse files
authored
Merge pull request #544 from wilx/2.0.x
Fix missing __android_log_write.
2 parents 6650345 + 2de9a22 commit 501a8b8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ConfigureChecks.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ find_library(LIBPOSIX4 posix4)
5555
find_library(LIBCPOSIX cposix)
5656
find_library(LIBSOCKET socket)
5757
find_library(LIBWS2_32 ws2_32)
58+
if (ANDROID)
59+
find_library (ANDROID_LOG_LIB log REQUIRED)
60+
endif (ANDROID)
5861

5962
check_function_exists(gmtime_r LOG4CPLUS_HAVE_GMTIME_R )
6063
check_function_exists(localtime_r LOG4CPLUS_HAVE_LOCALTIME_R )

src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ endif ()
108108
if (LOG4CPLUS_WITH_ICONV AND LIBICONV)
109109
list (APPEND log4cplus_LIBS ${LIBICONV})
110110
endif ()
111+
if (ANDROID AND WITH_UNIT_TESTS)
112+
list (APPEND log4cplus_LIBS ${ANDROID_LOG_LIB})
113+
endif ()
111114
target_link_libraries (${log4cplus} ${log4cplus_LIBS})
112115

113116
if (ANDROID)

0 commit comments

Comments
 (0)
0