Skip to content

Commit b03810c

Browse files
Enabled Archiver on Emscripten
1 parent 5c773e3 commit b03810c

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ elseif(PLATFORM_TVOS)
210210
target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_TVOS=1 PLATFORM_APPLE=1)
211211
elseif(PLATFORM_EMSCRIPTEN)
212212
set(GLES_SUPPORTED TRUE CACHE INTERNAL "OpenGLES is supported on Emscripten platform")
213+
set(ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on Emscripten platform")
213214
target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_EMSCRIPTEN=1)
214215
else()
215216
message(FATAL_ERROR "No PLATFORM_XXX variable defined. Make sure that 'DiligentCore' folder is processed first")

Graphics/Archiver/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ if(GL_SUPPORTED OR GLES_SUPPORTED)
140140
target_link_libraries(Diligent-Archiver-static PRIVATE GLEW::glew OpenGL::GL)
141141
elseif(PLATFORM_ANDROID)
142142
target_link_libraries(Diligent-Archiver-static PRIVATE GLESv3 EGL)
143+
elseif(PLATFORM_EMSCRIPTEN)
143144
else()
144145
message(FATAL_ERROR "Unsupported platform")
145146
endif()

Graphics/Archiver/interface/ArchiverFactoryLoader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2022 Diligent Graphics LLC
2+
* Copyright 2019-2024 Diligent Graphics LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@
2828

2929
#include "ArchiverFactory.h"
3030

31-
#if PLATFORM_ANDROID || PLATFORM_LINUX || PLATFORM_MACOS || PLATFORM_IOS || PLATFORM_TVOS || (PLATFORM_WIN32 && !defined(_MSC_VER))
31+
#if PLATFORM_ANDROID || PLATFORM_LINUX || PLATFORM_MACOS || PLATFORM_IOS || PLATFORM_TVOS || PLATFORM_EMSCRIPTEN || (PLATFORM_WIN32 && !defined(_MSC_VER))
3232
// https://gcc.gnu.org/wiki/Visibility
3333
# define API_QUALIFIER __attribute__((visibility("default")))
3434
#elif PLATFORM_WIN32 || PLATFORM_UNIVERSAL_WINDOWS

0 commit comments

Comments
 (0)