Skip to content

Commit

Permalink
[Examples] The showcase demo is not available with Emscripten anymore
Browse files Browse the repository at this point in the history
- This demo doesn't really make sense anymore anyway, and it cannot be linked with Emscripten due to a too long build command because of the assets
  • Loading branch information
Razakhel committed Sep 30, 2023
1 parent 6d5fe94 commit 822f76c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 133 deletions.
7 changes: 4 additions & 3 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ if (RAZ_USE_LUA)
target_link_libraries(RaZ_ScriptDemo RaZ_Examples)
endif()

add_executable(RaZ_ShowcaseDemo showcaseDemo.cpp)
target_link_libraries(RaZ_ShowcaseDemo RaZ_Examples)
if (NOT RAZ_USE_EMSCRIPTEN)
add_executable(RaZ_ShowcaseDemo showcaseDemo.cpp)
target_link_libraries(RaZ_ShowcaseDemo RaZ_Examples)
endif ()

add_executable(RaZ_SSRDemo ssrDemo.cpp)
target_link_libraries(RaZ_SSRDemo RaZ_Examples)
Expand All @@ -82,7 +84,6 @@ if (RAZ_USE_EMSCRIPTEN)
set_target_properties(RaZ_FullDemo PROPERTIES SUFFIX ".html")
set_target_properties(RaZ_MinDemo PROPERTIES SUFFIX ".html")
set_target_properties(RaZ_PhysicsDemo PROPERTIES SUFFIX ".html")
set_target_properties(RaZ_ShowcaseDemo PROPERTIES SUFFIX ".html")
set_target_properties(RaZ_SSRDemo PROPERTIES SUFFIX ".html")

if (RAZ_USE_AUDIO)
Expand Down
130 changes: 0 additions & 130 deletions examples/EmscriptenAssets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -203,136 +203,6 @@ target_link_options(
"SHELL:-s ALLOW_MEMORY_GROWTH=1"
)

#########################
# Assets - ShowcaseDemo #
#########################

set(
RaZ_ShowcaseDemo_ASSETS

# Skyboxes
assets/skyboxes/clouds_right.png
assets/skyboxes/clouds_top.png
assets/skyboxes/clouds_front.png
assets/skyboxes/clouds_left.png
assets/skyboxes/clouds_bottom.png
assets/skyboxes/clouds_back.png

assets/skyboxes/lake_right.png
assets/skyboxes/lake_top.png
assets/skyboxes/lake_front.png
assets/skyboxes/lake_left.png
assets/skyboxes/lake_bottom.png
assets/skyboxes/lake_back.png

# Shield mesh
assets/meshes/shield.obj
assets/materials/shield.mtl
assets/textures/shield_albedo.png
assets/textures/shield_normal.png
assets/textures/shield_metallic.png
assets/textures/shield_roughness.png
assets/textures/shield_ao.png

# Crytek Sponza mesh
assets/meshes/crytek_sponza.obj
assets/materials/crytek_sponza.mtl

assets/textures/sponza_thorn_diff.png
assets/textures/sponza_thorn_mask.png
assets/textures/sponza_thorn_bump.png

assets/textures/vase_round.png
assets/textures/vase_round_bump.png

assets/textures/vase_plant.png
assets/textures/vase_plant_mask.png

assets/textures/background.png
assets/textures/background_bump.png

assets/textures/spnza_bricks_a_spec.png
assets/textures/spnza_bricks_a_diff.png
assets/textures/spnza_bricks_a_bump.png

assets/textures/sponza_arch_diff.png

assets/textures/sponza_ceiling_a_diff.png

assets/textures/sponza_column_a_diff.png
assets/textures/sponza_column_a_bump.png

assets/textures/sponza_floor_a_diff.png

assets/textures/sponza_column_c_diff.png
assets/textures/sponza_column_c_bump.png

assets/textures/sponza_details_diff.png

assets/textures/sponza_column_b_diff.png
assets/textures/sponza_column_b_bump.png

assets/textures/sponza_flagpole_diff.png

assets/textures/sponza_fabric_green_diff.png

assets/textures/sponza_fabric_blue_diff.png

assets/textures/sponza_fabric_diff.png

assets/textures/sponza_curtain_blue_diff.png

assets/textures/sponza_curtain_diff.png

assets/textures/sponza_curtain_green_diff.png

assets/textures/chain_texture.png
assets/textures/chain_texture_mask.png
assets/textures/chain_texture_bump.png

assets/textures/vase_hanging.png

assets/textures/vase_dif.png
assets/textures/vase_bump.png

assets/textures/lion.png
assets/textures/lion_bump.png

assets/textures/sponza_roof_diff.png

# Ball mesh
assets/meshes/ball.obj
assets/materials/test.mtl

assets/textures/rustediron_albedo.png
assets/textures/rustediron_normal.png
assets/textures/rustediron_metallic.png
assets/textures/rustediron_roughness.png

# Cerberus mesh
assets/meshes/cerberus.obj
assets/materials/cerberus.mtl

assets/textures/cerberus_albedo.png
assets/textures/cerberus_normal.png
assets/textures/cerberus_metallic.png
assets/textures/cerberus_roughness.png
assets/textures/cerberus_ao.png
)

foreach (ASSET_PATH ${RaZ_ShowcaseDemo_ASSETS})
target_link_options(RaZ_ShowcaseDemo PRIVATE "SHELL:--preload-file ${CMAKE_SOURCE_DIR}/${ASSET_PATH}@${ASSET_PATH}")
endforeach ()

target_link_options(
RaZ_ShowcaseDemo

PRIVATE

"SHELL:--preload-file ${CMAKE_SOURCE_DIR}/shaders@shaders"
"SHELL:-s ALLOW_MEMORY_GROWTH=1"
)

####################
# Assets - SSRDemo #
####################
Expand Down

0 comments on commit 822f76c

Please sign in to comment.