2021-03-16 22:38:07 +03:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
|
|
|
|
|
|
|
|
|
project(Game)
|
|
|
|
|
|
2021-03-21 14:13:02 +03:00
|
|
|
find_package(Curses REQUIRED)
|
|
|
|
|
|
|
|
|
|
include_directories(${CURSES_INCLUDE_DIR})
|
|
|
|
|
|
2021-03-16 22:38:07 +03:00
|
|
|
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
|
|
|
|
|
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
|
|
|
|
|
|
2021-04-11 20:14:23 +03:00
|
|
|
set(GameSource src/main.cpp)
|
2021-03-16 22:38:07 +03:00
|
|
|
|
2021-04-04 17:09:42 +03:00
|
|
|
set(OutApiSource
|
2021-04-11 20:14:23 +03:00
|
|
|
src/out_api/draw.cpp
|
|
|
|
|
src/out_api/game_draw.cpp
|
|
|
|
|
src/out_api/init.cpp
|
|
|
|
|
src/out_api/input_controller.cpp
|
|
|
|
|
src/out_api/input.cpp
|
|
|
|
|
src/out_api/menu_draw.cpp)
|
2021-04-04 17:09:42 +03:00
|
|
|
|
|
|
|
|
set(MenuSource
|
2021-04-11 20:14:23 +03:00
|
|
|
src/menu/menu.cpp)
|
2021-04-04 17:09:42 +03:00
|
|
|
|
|
|
|
|
set(GameMainSource
|
2021-04-11 20:14:23 +03:00
|
|
|
src/game/game_events.cpp
|
|
|
|
|
src/game/game_map.cpp
|
|
|
|
|
src/game/game_menu.cpp)
|
2021-04-04 17:09:42 +03:00
|
|
|
|
|
|
|
|
set(GameUnitSource
|
2021-04-11 20:14:23 +03:00
|
|
|
src/game/unit/module_builder.cpp
|
|
|
|
|
src/game/unit/unit_module.cpp
|
|
|
|
|
src/game/unit/unit.cpp)
|
2021-04-04 17:09:42 +03:00
|
|
|
|
|
|
|
|
set(GameMapEntitiesSource
|
2021-04-11 20:14:23 +03:00
|
|
|
src/game/map_entities/cell.cpp
|
|
|
|
|
src/game/map_entities/unit_obj.cpp
|
|
|
|
|
src/game/map_entities/actions/attack_action.cpp)
|
2021-04-04 17:09:42 +03:00
|
|
|
|
|
|
|
|
add_library(OutApi ${OutApiSource})
|
|
|
|
|
add_library(Menu ${MenuSource})
|
|
|
|
|
add_library(GameMain ${GameMainSource})
|
|
|
|
|
add_library(GameUnit ${GameUnitSource})
|
|
|
|
|
add_library(GameMapEntities ${GameMapEntitiesSource})
|
|
|
|
|
|
|
|
|
|
set(LIBS
|
|
|
|
|
OutApi
|
|
|
|
|
Menu
|
|
|
|
|
GameMain
|
|
|
|
|
GameUnit
|
|
|
|
|
GameMapEntities)
|
|
|
|
|
|
|
|
|
|
add_executable(Game ${GameSource})
|
|
|
|
|
target_link_libraries(Game ${CURSES_LIBRARIES})
|
|
|
|
|
target_link_libraries(Game ${LIBS})
|