diff options
| author | 3gg <3gg@shellblade.net> | 2025-11-16 18:23:37 -0800 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2025-11-16 18:23:37 -0800 |
| commit | 403730174aeaadcf7a8aad842bc5319050411ef9 (patch) | |
| tree | ca19383484d51593666fc8add3da2dd00098ef42 /CMakeLists.txt | |
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..537c00d --- /dev/null +++ b/CMakeLists.txt | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.30) | ||
| 2 | |||
| 3 | project(swgfx) | ||
| 4 | |||
| 5 | set(CMAKE_C_STANDARD 23) | ||
| 6 | set(CMAKE_C_STANDARD_REQUIRED On) | ||
| 7 | set(CMAKE_C_EXTENSIONS Off) | ||
| 8 | |||
| 9 | # Library. | ||
| 10 | |||
| 11 | add_library(swgfx STATIC | ||
| 12 | include/swgfx.h | ||
| 13 | src/swgfx.c) | ||
| 14 | |||
| 15 | target_include_directories(swgfx PUBLIC | ||
| 16 | include/) | ||
| 17 | |||
| 18 | target_link_libraries(swgfx PRIVATE | ||
| 19 | math) | ||
| 20 | |||
| 21 | target_compile_options(swgfx PRIVATE -Wall -Wextra) | ||
| 22 | |||
| 23 | # Tests. | ||
| 24 | |||
| 25 | add_executable(swgfx-test | ||
| 26 | test/test.c) | ||
| 27 | |||
| 28 | target_link_libraries(swgfx-test | ||
| 29 | swgfx) | ||
| 30 | |||
| 31 | target_compile_options(swgfx-test PRIVATE -Wall -Wextra) | ||
| 32 | |||
