diff options
| author | 3gg <3gg@shellblade.net> | 2024-03-09 08:43:26 -0800 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2024-03-09 08:43:26 -0800 |
| commit | adbd2511beec8f1caa1752bdfd755cc2f62ba425 (patch) | |
| tree | 8fde167e9d9951b43e571a2417ae55f9572bea28 /gfx-iso/CMakeLists.txt | |
| parent | 4bc4ca2796bd434880b77d3c4bcbb56107456777 (diff) | |
Make isogfx a library instead of an executable.
Diffstat (limited to 'gfx-iso/CMakeLists.txt')
| -rw-r--r-- | gfx-iso/CMakeLists.txt | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/gfx-iso/CMakeLists.txt b/gfx-iso/CMakeLists.txt index 993bbb3..673cb68 100644 --- a/gfx-iso/CMakeLists.txt +++ b/gfx-iso/CMakeLists.txt | |||
| @@ -2,33 +2,42 @@ cmake_minimum_required(VERSION 3.0) | |||
| 2 | 2 | ||
| 3 | project(isogfx) | 3 | project(isogfx) |
| 4 | 4 | ||
| 5 | set(CMAKE_C_STANDARD 11) | 5 | set(CMAKE_C_STANDARD 17) |
| 6 | set(CMAKE_C_STANDARD_REQUIRED On) | 6 | set(CMAKE_C_STANDARD_REQUIRED On) |
| 7 | set(CMAKE_C_EXTENSIONS Off) | 7 | set(CMAKE_C_EXTENSIONS Off) |
| 8 | 8 | ||
| 9 | # isogfx | ||
| 10 | |||
| 9 | add_library(isogfx | 11 | add_library(isogfx |
| 10 | src/isogfx.c) | 12 | src/isogfx.c) |
| 11 | 13 | ||
| 12 | target_include_directories(isogfx PUBLIC | 14 | target_include_directories(isogfx PUBLIC |
| 13 | include) | 15 | include) |
| 14 | 16 | ||
| 15 | target_link_libraries(isogfx PRIVATE | 17 | target_link_libraries(isogfx PUBLIC |
| 16 | filesystem | 18 | filesystem |
| 17 | mem | 19 | mem |
| 18 | mempool) | 20 | mempool) |
| 19 | 21 | ||
| 20 | target_compile_options(isogfx PRIVATE -Wall -Wextra -Wpedantic) | 22 | target_compile_options(isogfx PRIVATE -Wall -Wextra -Wpedantic) |
| 21 | 23 | ||
| 22 | # Demo | 24 | # App |
| 23 | 25 | ||
| 24 | project(isogfx-app) | 26 | add_library(isogfx-app |
| 27 | src/app.c) | ||
| 25 | 28 | ||
| 26 | add_executable(isogfx-app | 29 | target_include_directories(isogfx-app PUBLIC |
| 27 | app/checkerboard.c | 30 | include) |
| 28 | app/isogfx-demo.c | ||
| 29 | app/main.c) | ||
| 30 | 31 | ||
| 31 | target_link_libraries(isogfx-app PRIVATE | 32 | target_link_libraries(isogfx-app PUBLIC |
| 32 | gfx | ||
| 33 | gfx-app | 33 | gfx-app |
| 34 | isogfx) | 34 | isogfx) |
| 35 | |||
| 36 | target_link_libraries(isogfx-app PRIVATE | ||
| 37 | gfx) | ||
| 38 | |||
| 39 | target_compile_options(isogfx-app PRIVATE -Wall -Wextra -Wpedantic) | ||
| 40 | |||
| 41 | # Demos | ||
| 42 | |||
| 43 | add_subdirectory(demos) | ||
