configure/cmake: Hook up Emscripten threads (disabled by default).

Fixes #3795.
This commit is contained in:
Ryan C. Gordon committed 2021-04-04 00:16:30 -04:00
1 parent 354cabd4a7
commit a81fe27271
4 files changed
+103 -50

No files matched your search

+3
View File
@@ -919,6 +919,9 @@ macro(CheckPTHREAD)
elseif(HAIKU)
set(PTHREAD_CFLAGS "-D_REENTRANT")
set(PTHREAD_LDFLAGS "")
elseif(EMSCRIPTEN)
set(PTHREAD_CFLAGS "-D_REENTRANT -pthread")
set(PTHREAD_LDFLAGS "-pthread")
else()
set(PTHREAD_CFLAGS "-D_REENTRANT")
set(PTHREAD_LDFLAGS "-lpthread")