60 lines
1.9 KiB
CMake
60 lines
1.9 KiB
CMake
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/building_factory.c
|
|
game/building_factory.h
|
|
game/components.c
|
|
game/components.h
|
|
game/constants.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
|
|
game/utils.h
|
|
game/wave.c
|
|
game/wave.h
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(PixelDefense LINK_PRIVATE Breeze)
|
|
if (EMSCRIPTEN)
|
|
#set_target_properties(PixelDefense
|
|
# PROPERTIES SUFFIX ".html"
|
|
# LINK_FLAGS "-lidbfs.js --shell-file ../index.html -sEXPORTED_FUNCTIONS=_loopPause,_loopResume,_main -sEXTRA_EXPORTED_RUNTIME_METHODS=ccall -sFORCE_FILESYSTEM=1 -sWASM=1 -sSTACK_OVERFLOW_CHECK=2 -sALLOW_MEMORY_GROWTH -sSTACK_SIZE=10MB -sASSERTIONS=2 -sMIN_WEBGL_VERSION=1 --preload-file ../assets -g2 -gseparate-dwarf -gsource-map -sUSE_GLFW=3")
|
|
set_target_properties(PixelDefense
|
|
PROPERTIES SUFFIX ".html"
|
|
LINK_FLAGS "-lidbfs.js -O3 --shell-file ../index.html -sEXPORTED_FUNCTIONS=_loopPause,_loopResume,_main -sEXTRA_EXPORTED_RUNTIME_METHODS=ccall -sFORCE_FILESYSTEM=1 -sWASM=1 -sALLOW_MEMORY_GROWTH -sSTACK_SIZE=10MB -sASSERTIONS=0 -sMIN_WEBGL_VERSION=1 --preload-file ../assets -sUSE_GLFW=3")
|
|
endif()
|