forked from TheSpydog/SDL_gpu_examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
64 lines (59 loc) · 1.78 KB
/
Copy pathCMakeLists.txt
File metadata and controls
64 lines (59 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
cmake_minimum_required(VERSION 3.10)
project(SDL_gpu_examples)
set(CMAKE_C_STANDARD 23)
set(SDL_WGPU_LIB "dawn")
set(SDL_WGPU_STATIC ON)
set(SDL_WGPU_LIB_BYO ON)
add_subdirectory(extern/SDL)
add_executable(SDL_gpu_examples
Examples/main.c
Examples/Common.h
stb_image.h
Examples/Common.c
Examples/ClearScreen.c
Examples/ClearScreenMultiWindow.c
Examples/BasicTriangle.c
Examples/BasicVertexBuffer.c
Examples/CullMode.c
Examples/BasicStencil.c
Examples/InstancedIndexed.c
Examples/TexturedQuad.c
Examples/ComputeSampler.c
Examples/TexturedAnimatedQuad.c
Examples/Clear3DSlice.c
Examples/BasicCompute.c
Examples/ComputeUniforms.c
Examples/ToneMapping.c
Examples/CustomSampling.c
Examples/DrawIndirect.c
Examples/ComputeSpriteBatch.c
Examples/CopyAndReadback.c
Examples/CopyConsistency.c
Examples/Texture2DArray.c
Examples/TriangleMSAA.c
Examples/Cubemap.c
Examples/WindowResize.c
Examples/Blit2DArray.c
Examples/BlitCube.c
Examples/BlitMirror.c
Examples/GenerateMipmaps.c
Examples/Latency.c
Examples/DepthArray.c
Examples/DepthSampler.c
Examples/PullSpriteBatch.c
Examples/TextureTypeTest.c
Examples/CompressedTextures.c
Examples/Bloom.c
)
add_custom_command(TARGET SDL_gpu_examples PRE_LINK
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/Content $<TARGET_FILE_DIR:SDL_gpu_examples>/Content
)
target_compile_options(SDL_gpu_examples PRIVATE "--use-port=emdawnwebgpu")
set_target_properties(SDL_gpu_examples PROPERTIES SUFFIX ".html")
target_link_libraries(SDL_gpu_examples PRIVATE SDL3::SDL3)
target_link_options(SDL_gpu_examples PRIVATE
"-sASYNCIFY=1"
"-sALLOW_MEMORY_GROWTH=1"
"--use-port=emdawnwebgpu"
"--preload-file" "Content/"
)