-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
63 lines (59 loc) · 1.68 KB
/
CMakeLists.txt
File metadata and controls
63 lines (59 loc) · 1.68 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
cmake_minimum_required(VERSION 3.10)
project(SDL_gpu_examples)
find_package(SDL3 CONFIG QUIET)
if(NOT SDL3_FOUND)
message(STATUS "SDL3 not found. Building it from source.")
include(FetchContent)
FetchContent_Declare(
SDL
GIT_REPOSITORY https://github.com/libsdl-org/SDL
GIT_TAG "release-3.2.16"
)
FetchContent_MakeAvailable(SDL)
else()
find_package(SDL3 REQUIRED)
endif()
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/DepthSampler.c
Examples/PullSpriteBatch.c
Examples/TextureTypeTest.c
Examples/CompressedTextures.c
)
target_link_libraries(SDL_gpu_examples
SDL3::SDL3
)
add_custom_command(TARGET SDL_gpu_examples POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/Content $<TARGET_FILE_DIR:SDL_gpu_examples>/Content
)