Implement hot reloading

This commit is contained in:
2025-01-05 19:41:44 +00:00
parent 1531817dc4
commit 2077ecde63
6 changed files with 100 additions and 13 deletions

View File

@@ -1,12 +1,17 @@
add_executable(game main.c)
if(${HOTRELOAD})
add_library(game SHARED main.c)
get_target_property(ENGINE_INCLUDES engine INCLUDE_DIRECTORIES)
target_include_directories(game PRIVATE ${ENGINE_INCLUDES})
else()
add_executable(game main.c)
target_link_libraries(game PRIVATE engine)
endif()
set_default_target_options(game)
target_include_directories(game PUBLIC include)
target_link_libraries(game PRIVATE
engine
m
LibXml2::LibXml2
SDL2::SDL2
SDL2::SDL2main
SDL2_image::SDL2_image
)