From adbd2511beec8f1caa1752bdfd755cc2f62ba425 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 9 Mar 2024 08:43:26 -0800 Subject: Make isogfx a library instead of an executable. --- gfx-iso/CMakeLists.txt | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'gfx-iso/CMakeLists.txt') 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) project(isogfx) -set(CMAKE_C_STANDARD 11) +set(CMAKE_C_STANDARD 17) set(CMAKE_C_STANDARD_REQUIRED On) set(CMAKE_C_EXTENSIONS Off) +# isogfx + add_library(isogfx src/isogfx.c) target_include_directories(isogfx PUBLIC include) -target_link_libraries(isogfx PRIVATE +target_link_libraries(isogfx PUBLIC filesystem mem mempool) target_compile_options(isogfx PRIVATE -Wall -Wextra -Wpedantic) -# Demo +# App -project(isogfx-app) +add_library(isogfx-app + src/app.c) -add_executable(isogfx-app - app/checkerboard.c - app/isogfx-demo.c - app/main.c) +target_include_directories(isogfx-app PUBLIC + include) -target_link_libraries(isogfx-app PRIVATE - gfx +target_link_libraries(isogfx-app PUBLIC gfx-app isogfx) + +target_link_libraries(isogfx-app PRIVATE + gfx) + +target_compile_options(isogfx-app PRIVATE -Wall -Wextra -Wpedantic) + +# Demos + +add_subdirectory(demos) -- cgit v1.2.3