diff --git a/CMakeLists.txt b/CMakeLists.txt index 5db0f0108..2070e3a50 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,7 +64,7 @@ option(MUNT "MUNT" ON) option(VRAMDUMP "Video RAM dumping" OFF) option(DINPUT "DirectInput" OFF) option(DISCORD "Discord integration" ON) -option(CPPTHRAD "C++11 threads" ON) +option(CPPTHREADS "C++11 threads" ON) option(NEW_DYNAREC "Use the PCem v15 (\"new\") dynamic recompiler" OFF) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 142fdfabd..742e8a1af 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -39,7 +39,7 @@ add_executable(86Box WIN32 MACOSX_BUNDLE 86box.c config.c log.c random.c timer.c device.c nvr.c nvr_at.c nvr_ps2.c rtmidi_midi.cpp ${APP_ICON_MACOSX}) if(CPPTHREADS) - target_sources(plat PRIVATE cpp11_thread.cpp) + target_sources(86Box PRIVATE cpp11_thread.cpp) endif() if(APPLE) diff --git a/src/unix/CMakeLists.txt b/src/unix/CMakeLists.txt index 7cd52879b..22a424a3a 100644 --- a/src/unix/CMakeLists.txt +++ b/src/unix/CMakeLists.txt @@ -30,8 +30,8 @@ endif() if (NOT CPPTHREADS) target_sources(plat PRIVATE unix_thread.c) - - set(THREADS_PREFER_PTHREAD_FLAG TRUE) - find_package(Threads REQUIRED) - target_link_libraries(86Box Threads::Threads) endif() + +set(THREADS_PREFER_PTHREAD_FLAG TRUE) +find_package(Threads REQUIRED) +target_link_libraries(86Box Threads::Threads) diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index d7bf837da..d7a676713 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -164,7 +164,7 @@ ifndef DYNAREC DYNAREC := y endif ifndef CPPTHREADS - CPPTHREADS := cpp11 + CPPTHREADS := y endif ifeq ($(DYNAREC), y) ifeq ($(ARM), y)