From 4cb29fbc2d20f20e9d605796b137b4b70363113a Mon Sep 17 00:00:00 2001 From: 0scar Date: Fri, 28 Jul 2023 16:32:58 +0200 Subject: Implement hotloading * This commit implements dltools.{c,h}: _A simple wrapper around libdl / dlfcn.h_ * Reload states when done initializing engine, if hotloading is enabled. * Adds general function types for state functions. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index ebe9aae..c7355a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,7 @@ endif() set(ENGINE_SOURCES src/btree.c + src/dltools.c src/engine.c src/fov.c src/hashmap.c @@ -79,6 +80,7 @@ target_include_directories(daw PUBLIC target_link_libraries(${PROJECT_NAME} SDL2 SDL2_image SDL2_ttf $<$>:m> + $<$:dl> $<$>,$>:ubsan> ) @@ -97,6 +99,7 @@ target_compile_options(${PROJECT_NAME} PUBLIC target_compile_definitions(${PROJECT_NAME} PUBLIC $<$:DAW_BUILD_DEBUG> + $<$:DAW_BUILD_HOTRELOAD> ) -- cgit v1.3