From 682e78b4b319bb1253998154efa67f147469454f Mon Sep 17 00:00:00 2001 From: gilzoide Date: Sat, 1 Feb 2025 20:26:38 -0300 Subject: [PATCH] Set PLATFORM to Web by default when configuring web builds with emcmake --- CMakeOptions.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeOptions.txt b/CMakeOptions.txt index 00ecb594d..4e413fe61 100644 --- a/CMakeOptions.txt +++ b/CMakeOptions.txt @@ -2,6 +2,10 @@ include(CMakeDependentOption) include(EnumOption) +if(EMSCRIPTEN) + # When configuring web builds with "emcmake cmake -B build -S .", set PLATFORM to Web by default + SET(PLATFORM Web CACHE STRING "Platform to build for.") +endif() enum_option(PLATFORM "Desktop;Web;Android;Raspberry Pi;DRM;SDL" "Platform to build for.") enum_option(OPENGL_VERSION "OFF;4.3;3.3;2.1;1.1;ES 2.0;ES 3.0" "Force a specific OpenGL Version?")