summaryrefslogtreecommitdiff
path: root/gfx-iso/CMakeLists.txt
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2024-03-09 08:43:26 -0800
committer3gg <3gg@shellblade.net>2024-03-09 08:43:26 -0800
commitadbd2511beec8f1caa1752bdfd755cc2f62ba425 (patch)
tree8fde167e9d9951b43e571a2417ae55f9572bea28 /gfx-iso/CMakeLists.txt
parent4bc4ca2796bd434880b77d3c4bcbb56107456777 (diff)
Make isogfx a library instead of an executable.
Diffstat (limited to 'gfx-iso/CMakeLists.txt')
-rw-r--r--gfx-iso/CMakeLists.txt29
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
3project(isogfx) 3project(isogfx)
4 4
5set(CMAKE_C_STANDARD 11) 5set(CMAKE_C_STANDARD 17)
6set(CMAKE_C_STANDARD_REQUIRED On) 6set(CMAKE_C_STANDARD_REQUIRED On)
7set(CMAKE_C_EXTENSIONS Off) 7set(CMAKE_C_EXTENSIONS Off)
8 8
9# isogfx
10
9add_library(isogfx 11add_library(isogfx
10 src/isogfx.c) 12 src/isogfx.c)
11 13
12target_include_directories(isogfx PUBLIC 14target_include_directories(isogfx PUBLIC
13 include) 15 include)
14 16
15target_link_libraries(isogfx PRIVATE 17target_link_libraries(isogfx PUBLIC
16 filesystem 18 filesystem
17 mem 19 mem
18 mempool) 20 mempool)
19 21
20target_compile_options(isogfx PRIVATE -Wall -Wextra -Wpedantic) 22target_compile_options(isogfx PRIVATE -Wall -Wextra -Wpedantic)
21 23
22# Demo 24# App
23 25
24project(isogfx-app) 26add_library(isogfx-app
27 src/app.c)
25 28
26add_executable(isogfx-app 29target_include_directories(isogfx-app PUBLIC
27 app/checkerboard.c 30 include)
28 app/isogfx-demo.c
29 app/main.c)
30 31
31target_link_libraries(isogfx-app PRIVATE 32target_link_libraries(isogfx-app PUBLIC
32 gfx
33 gfx-app 33 gfx-app
34 isogfx) 34 isogfx)
35
36target_link_libraries(isogfx-app PRIVATE
37 gfx)
38
39target_compile_options(isogfx-app PRIVATE -Wall -Wextra -Wpedantic)
40
41# Demos
42
43add_subdirectory(demos)