Skip to content

Commit 70ce513

Browse files
committed
[android] fix pthread flag inclusion in libxml2 package
1 parent 90c4f5c commit 70ce513

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "WASI")
150150
"-I${DISPATCH_INCLUDE_PATH}/Block")
151151
endif()
152152
endif()
153+
if(ANDROID)
154+
# LibXml2 looks for the Threads package, so
155+
# ensure that it doesn't try to use the `-pthread`
156+
# flag on Android.
157+
set(CMAKE_HAVE_LIBC_PTHREAD YES)
158+
endif()
153159
find_package(LibXml2 REQUIRED)
154160
if(FOUNDATION_BUILD_NETWORKING)
155161
find_package(CURL REQUIRED)

0 commit comments

Comments
 (0)