EtrediaEmpires/ECSAPI/Economy/CMakeLists.txt
legatt ff6c146153 Enterprise salary and API
- Enterprises have action type, money, salary and bankruption status
- Enterprise add and multiply functions replaced with setters
- Delivery contracts have cost, distance and sponsor reference. Value renamed to amount
- Integer values use static sizes types
- Action CONTAIN renamed to STORE
- Enterprises skip their action if is bankrupt
- Delivering transfers money from sponsor to deliverer due contract
- Enterprise routine system processes salaries and bankruptcy
- ee_ecs data structures renamed with snake_case
- Get enterprises info request
2025-08-06 17:52:37 +03:00

33 lines
990 B
CMake

project(Economy)
# List sources
set(HEADERS "economy.hpp" "defines.hpp" "enterprise_defaults.hpp" "systems.hpp")
set(HEADERS_COMPONENTS "container.hpp" "enterprise.hpp" "state.hpp" "tags.hpp"
"miner.hpp" "producer.hpp" "deliverer.hpp")
set(SOURCES "Economy.cpp")
set(SOURCES_SYSTEMS "enterprise_routine.cpp" "mining.cpp" "delivering.cpp")
list(TRANSFORM HEADERS PREPEND "include/ee_economy/")
list(TRANSFORM HEADERS_COMPONENTS PREPEND "include/ee_economy/components/")
list(TRANSFORM SOURCES PREPEND "src/")
list(TRANSFORM SOURCES_SYSTEMS PREPEND "src/systems/")
# Find dependencies
find_package(EnTT CONFIG REQUIRED)
# Link library
add_library(Economy SHARED ${HEADERS} ${HEADERS_COMPONENTS} ${SOURCES} ${SOURCES_SYSTEMS})
add_library(Economy::Economy ALIAS Economy)
target_link_libraries(Economy PRIVATE EnTT::EnTT)
target_include_directories(Economy PUBLIC include/)
if (CMAKE_VERSION VERSION_GREATER 3.12)
set_property(TARGET Economy PROPERTY CXX_STANDARD 20)
endif()