Skip to content

Commit 9c3e5f2

Browse files
committed
Harmony port: pthread enable
1 parent a886df9 commit 9c3e5f2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,6 +1543,8 @@ elseif(OHOS)
15431543
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/unix/*.c")
15441544
set(HAVE_SDL_TIMERS TRUE)
15451545

1546+
set(SDL_PTHREADS 1)
1547+
15461548
CheckPTHREAD()
15471549
elseif(EMSCRIPTEN)
15481550
# Hide noisy warnings that intend to aid mostly during initial stages of porting a new

cmake/sdlchecks.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ macro(CheckPTHREAD)
829829
if(ANDROID OR SDL_PTHREADS_PRIVATE)
830830
# the android libc provides built-in support for pthreads, so no
831831
# additional linking or compile flags are necessary
832-
elseif(LINUX)
832+
elseif(LINUX OR OHOS)
833833
set(PTHREAD_CFLAGS "-D_REENTRANT")
834834
set(PTHREAD_LDFLAGS "-pthread")
835835
elseif(BSDI)

0 commit comments

Comments
 (0)