diff options
| author | 3gg <3gg@shellblade.net> | 2025-12-27 12:03:39 -0800 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2025-12-27 12:03:39 -0800 |
| commit | 5a079a2d114f96d4847d1ee305d5b7c16eeec50e (patch) | |
| tree | 8926ab44f168acf787d8e19608857b3af0f82758 /CMakeLists.txt | |
Initial commit
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..a94f508 --- /dev/null +++ b/CMakeLists.txt | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.30) | ||
| 2 | |||
| 3 | project(game) | ||
| 4 | |||
| 5 | set(CMAKE_C_STANDARD 23) | ||
| 6 | set(CMAKE_C_STANDARD_REQUIRED On) | ||
| 7 | set(CMAKE_C_EXTENSIONS Off) | ||
| 8 | |||
| 9 | set(SDL_DIR contrib/SDL-3.2.8) | ||
| 10 | |||
| 11 | set(SDL_SHARED OFF) | ||
| 12 | set(SDL_STATIC ON) | ||
| 13 | add_subdirectory(${SDL_DIR}) | ||
| 14 | |||
| 15 | add_executable(game | ||
| 16 | src/main.c) | ||
| 17 | |||
| 18 | target_include_directories(game PRIVATE | ||
| 19 | ${SDL_DIR}/include | ||
| 20 | include) | ||
| 21 | |||
| 22 | target_link_libraries(game | ||
| 23 | SDL3-static | ||
| 24 | filesystem | ||
| 25 | math | ||
| 26 | swgfx) | ||
| 27 | |||
| 28 | target_compile_options(game PRIVATE -Wall -Wextra) | ||
| 29 | |||
| 30 | # Tools. | ||
| 31 | |||
| 32 | add_executable(ase | ||
| 33 | tools/ase/main.c) | ||
| 34 | |||
| 35 | target_include_directories(ase PRIVATE | ||
| 36 | include) | ||
| 37 | |||
| 38 | target_compile_options(ase PRIVATE -Wall -Wextra) | ||
