cmake_minimum_required(VERSION 3.26)
project(PixelDefense C)

set(CMAKE_C_STANDARD 11)


set(BUILD_BREEZE_TESTS true)
add_subdirectory(engine/)


add_executable(PixelDefense
        game/systems/s_ai.c
        game/systems/s_animation.c
        game/systems/s_entity.c
        game/systems/s_event.c
        game/systems/s_input.c
        game/systems/s_ui.c
        game/systems/systems.c
        game/systems/systems.h

        game/ai_actions.c
        game/ai_actions.h
        game/buildings.c
        game/buildings.h
        game/components.c
        game/components.h
        game/entity_factory.c
        game/entity_factory.h
        game/entrypoint.c
        game/game_state.h
        game/game_tileset.h
        game/input.h
        game/main.c
        game/map_init.c
        game/map_init.h
        game/map_layers.h
        game/pathfinding.c
        game/pathfinding.h
        game/sounds.c
        game/sounds.h
        game/ui_widgets.c
        game/ui_widgets.h
)



target_link_libraries(PixelDefense LINK_PRIVATE Breeze)
if (EMSCRIPTEN)
    set_target_properties(PixelDefense
            PROPERTIES SUFFIX ".html"
            LINK_FLAGS " --bind -s WASM=1 -s ALLOW_MEMORY_GROWTH -s STACK_SIZE=2048kb -s ASSERTIONS=2 -s MIN_WEBGL_VERSION=1 --preload-file ../assets -g2 -gseparate-dwarf -gsource-map -s USE_GLFW=3")
endif()
