@@ -47,7 +47,7 @@ set(PLATFORM_LINUX FALSE CACHE INTERNAL "")
4747set (PLATFORM_MACOS FALSE CACHE INTERNAL "" )
4848set (PLATFORM_IOS FALSE CACHE INTERNAL "" )
4949set (PLATFORM_TVOS FALSE CACHE INTERNAL "" )
50- set (PLATFORM_EMSCRIPTEN FALSE CACHE INTERNAL "" )
50+ set (PLATFORM_WEB FALSE CACHE INTERNAL "" )
5151set (D3D11_SUPPORTED FALSE CACHE INTERNAL "D3D11 is not supported" )
5252set (D3D12_SUPPORTED FALSE CACHE INTERNAL "D3D12 is not supported" )
5353set (GL_SUPPORTED FALSE CACHE INTERNAL "GL is not supported" )
@@ -141,8 +141,8 @@ else()
141141 set (PLATFORM_TVOS TRUE CACHE INTERNAL "Target platform: tvOS" )
142142 message ("Target platform: tvOS " ${ARCH} )
143143 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten" )
144- set (PLATFORM_EMSCRIPTEN TRUE CACHE INTERNAL "Target platform: Emscripten " )
145- message ("Target platform: Emscripten " ${ARCH} )
144+ set (PLATFORM_WEB TRUE CACHE INTERNAL "Target platform: Web " )
145+ message ("Target platform: Web " ${ARCH} )
146146 else ()
147147 message (FATAL_ERROR "Unsupported platform" )
148148 endif ()
@@ -210,11 +210,11 @@ elseif(PLATFORM_IOS)
210210 target_compile_definitions (Diligent-PublicBuildSettings INTERFACE PLATFORM_IOS=1 PLATFORM_APPLE=1)
211211elseif (PLATFORM_TVOS)
212212 target_compile_definitions (Diligent-PublicBuildSettings INTERFACE PLATFORM_TVOS=1 PLATFORM_APPLE=1)
213- elseif (PLATFORM_EMSCRIPTEN )
214- set (GLES_SUPPORTED TRUE CACHE INTERNAL "OpenGLES is supported on Emscripten platform" )
215- set (WEBGPU_SUPPORTED TRUE CACHE INTERNAL "WebGPU is supported on Emscripten platform" )
216- set (ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on Emscripten platform" )
217- target_compile_definitions (Diligent-PublicBuildSettings INTERFACE PLATFORM_EMSCRIPTEN=1)
213+ elseif (PLATFORM_WEB )
214+ set (GLES_SUPPORTED TRUE CACHE INTERNAL "OpenGLES is supported on Web platform" )
215+ set (WEBGPU_SUPPORTED TRUE CACHE INTERNAL "WebGPU is supported on Web platform" )
216+ set (ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on Web platform" )
217+ target_compile_definitions (Diligent-PublicBuildSettings INTERFACE PLATFORM_WEB=1 PLATFORM_EMSCRIPTEN=1)
218218else ()
219219 message (FATAL_ERROR "No PLATFORM_XXX variable defined. Make sure that 'DiligentCore' folder is processed first" )
220220endif ()
@@ -268,7 +268,7 @@ if(PLATFORM_APPLE)
268268 endif ()
269269endif ()
270270
271- if (PLATFORM_WIN32 OR PLATFORM_LINUX OR PLATFORM_MACOS OR PLATFORM_EMSCRIPTEN )
271+ if (PLATFORM_WIN32 OR PLATFORM_LINUX OR PLATFORM_MACOS OR PLATFORM_WEB )
272272 option (DILIGENT_BUILD_TESTS "Build Diligent Engine tests" OFF )
273273 if (DILIGENT_BUILD_TESTS)
274274 set (DILIGENT_BUILD_CORE_TESTS TRUE CACHE INTERNAL "Build Core tests" )
@@ -299,7 +299,7 @@ option(DILIGENT_NO_DIRECT3D12 "Disable Direct3D12 backend" OFF)
299299option (DILIGENT_NO_OPENGL "Disable OpenGL/GLES backend" OFF )
300300option (DILIGENT_NO_VULKAN "Disable Vulkan backend" OFF )
301301option (DILIGENT_NO_METAL "Disable Metal backend" OFF )
302- if (PLATFORM_EMSCRIPTEN )
302+ if (PLATFORM_WEB )
303303 option (DILIGENT_NO_WEBGPU "Disable WebGPU backend" OFF )
304304else ()
305305 option (DILIGENT_NO_WEBGPU "Disable WebGPU backend" ON )
@@ -370,7 +370,7 @@ endif()
370370
371371add_library (Diligent-BuildSettings INTERFACE )
372372
373- if (PLATFORM_EMSCRIPTEN )
373+ if (PLATFORM_WEB )
374374 target_compile_options (Diligent-BuildSettings INTERFACE
375375 "-pthread"
376376 "-mbulk-memory"
0 commit comments