summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2020-12-05 21:57:47 +0100
committerPatric Stout <github@truebrain.nl>2020-12-15 15:46:39 +0100
commitd15dc9f40f5a20bff452547a2dcb15231f9f969d (patch)
tree7b8d88635c048d906cbb6358007fb26055e24410 /cmake
parent2da07f76154d841bcfe9aaff4833144550186deb (diff)
downloadopenttd-d15dc9f40f5a20bff452547a2dcb15231f9f969d.tar.xz
Add: support for emscripten (play-OpenTTD-in-the-browser)
Emscripten compiles to WASM, which can be loaded via HTML / JavaScript. This allows you to play OpenTTD inside a browser. Co-authored-by: milek7 <me@milek7.pl>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Options.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/Options.cmake b/cmake/Options.cmake
index 977d54f06..c94a193b3 100644
--- a/cmake/Options.cmake
+++ b/cmake/Options.cmake
@@ -55,7 +55,13 @@ function(set_options)
option(OPTION_DEDICATED "Build dedicated server only (no GUI)" OFF)
option(OPTION_INSTALL_FHS "Install with Filesystem Hierarchy Standard folders" ${DEFAULT_OPTION_INSTALL_FHS})
option(OPTION_USE_ASSERTS "Use assertions; leave enabled for nightlies, betas, and RCs" ON)
- option(OPTION_USE_THREADS "Use threads" ON)
+ if(EMSCRIPTEN)
+ # Although pthreads is supported, it is not in a way yet that is
+ # useful for us.
+ option(OPTION_USE_THREADS "Use threads" OFF)
+ else()
+ option(OPTION_USE_THREADS "Use threads" ON)
+ endif()
option(OPTION_USE_NSIS "Use NSIS to create windows installer; enable only for stable releases" OFF)
option(OPTION_TOOLS_ONLY "Build only tools target" OFF)
option(OPTION_DOCS_ONLY "Build only docs target" OFF)