From 1e0beab2546a4b723c8a15b0b63adbf271c1426c Mon Sep 17 00:00:00 2001
From: GoldenTails <milestailsprower101n2@gmail.com>
Date: Tue, 20 Oct 2020 15:58:34 -0500
Subject: [PATCH] Add i_threads.h too

---
 src/CMakeLists.txt     | 6 ++++++
 src/sdl/CMakeLists.txt | 2 --
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0da48fd80..3409c49d3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -472,6 +472,12 @@ if(${SRB2_CONFIG_HAVE_CURL})
 	endif()
 endif()
 
+if(${SRB2_CONFIG_HAVE_THREADS})
+	set(SRB2_HAVE_THREADS ON)
+	set(SRB2_CORE_HEADERS ${SRB2_CORE_HEADERS} ${CMAKE_CURRENT_SOURCE_DIR}/i_threads.h)
+	add_definitions(-DHAVE_THREADS)
+endif()
+
 if(${SRB2_CONFIG_HWRENDER})
 	add_definitions(-DHWRENDER)
 	set(SRB2_HWRENDER_SOURCES
diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt
index dab7f4934..bb5edf817 100644
--- a/src/sdl/CMakeLists.txt
+++ b/src/sdl/CMakeLists.txt
@@ -56,9 +56,7 @@ set(SRB2_SDL2_HEADERS
 )
 
 if(${SRB2_CONFIG_HAVE_THREADS})
-	set(SRB2_HAVE_THREADS ON)
 	set(SRB2_SDL2_SOURCES ${SRB2_SDL2_SOURCES} i_threads.c)
-	add_definitions(-DHAVE_THREADS)
 endif()
 
 source_group("Interface Code" FILES ${SRB2_SDL2_SOURCES} ${SRB2_SDL2_HEADERS})
-- 
GitLab