Skip to content
Snippets Groups Projects
Commit 333d3a25 authored by James R.'s avatar James R.
Browse files

Merge branch 'cmake-multithreading' into 'master'

Add multithreading option for CMake

See merge request !1204
parents 7952408c 1e0beab2
No related branches found
No related tags found
1 merge request!1204Add multithreading option for CMake
......@@ -231,6 +231,8 @@ set(SRB2_CONFIG_HAVE_OPENMPT ON CACHE BOOL
"Enable OpenMPT support.")
set(SRB2_CONFIG_HAVE_CURL ON CACHE BOOL
"Enable curl support, used for downloading files via HTTP.")
set(SRB2_CONFIG_HAVE_THREADS ON CACHE BOOL
"Enable multithreading support.")
if(${CMAKE_SYSTEM} MATCHES Windows)
set(SRB2_CONFIG_HAVE_MIXERX ON CACHE BOOL
"Enable SDL Mixer X support.")
......@@ -470,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
......
......@@ -55,6 +55,10 @@ set(SRB2_SDL2_HEADERS
sdlmain.h
)
if(${SRB2_CONFIG_HAVE_THREADS})
set(SRB2_SDL2_SOURCES ${SRB2_SDL2_SOURCES} i_threads.c)
endif()
source_group("Interface Code" FILES ${SRB2_SDL2_SOURCES} ${SRB2_SDL2_HEADERS})
# Dependency
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment