Skip to content

Commit 41191f1

Browse files
authored
Fix "pthread not found" build error when using Android NDK (#344)
Android NDK bundles pthread symbols into libc, rather than having a separate libpthread like other POSIX platforms. Therefore, explicit pthread linkage is not needed.
1 parent 0131da9 commit 41191f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ if(WIN32)
280280
if(OpenSSL_FOUND)
281281
target_link_libraries(${PROJECT_NAME} PRIVATE crypt32 secur32)
282282
endif(OpenSSL_FOUND)
283-
else(WIN32)
283+
elseif(NOT ANDROID)
284284
target_link_libraries(${PROJECT_NAME} PRIVATE pthread $<$<PLATFORM_ID:SunOS>:socket>)
285285
endif(WIN32)
286286

0 commit comments

Comments
 (0)