Skip to content

Commit

Permalink
Fix "pthread not found" build error when using Android NDK (#344)
Browse files Browse the repository at this point in the history
Android NDK bundles pthread symbols into libc, rather than having a separate libpthread like other POSIX platforms. Therefore, explicit pthread linkage is not needed.
  • Loading branch information
AelecTi committed Jul 19, 2024
1 parent 0131da9 commit 41191f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ if(WIN32)
if(OpenSSL_FOUND)
target_link_libraries(${PROJECT_NAME} PRIVATE crypt32 secur32)
endif(OpenSSL_FOUND)
else(WIN32)
elseif(NOT ANDROID)
target_link_libraries(${PROJECT_NAME} PRIVATE pthread $<$<PLATFORM_ID:SunOS>:socket>)
endif(WIN32)

Expand Down

0 comments on commit 41191f1

Please sign in to comment.