Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,23 @@ set(SOURCES
src/gameplay/classes/mob_classes_info.cpp
src/gameplay/classes/recalc_mob_params_by_vnum.cpp)

# Loot tables module sources (requires yaml-cpp via HAVE_YAML option)
set(LOOT_TABLES_SOURCES
src/gameplay/mechanics/loot_tables/loot_table_types.cpp
src/gameplay/mechanics/loot_tables/loot_table.cpp
src/gameplay/mechanics/loot_tables/loot_registry.cpp
src/gameplay/mechanics/loot_tables/loot_loader.cpp
src/gameplay/mechanics/loot_tables/loot_logger.cpp
src/engine/ui/cmd_god/do_loottable.cpp)

set(LOOT_TABLES_HEADERS
src/gameplay/mechanics/loot_tables/loot_table_types.h
src/gameplay/mechanics/loot_tables/loot_table.h
src/gameplay/mechanics/loot_tables/loot_registry.h
src/gameplay/mechanics/loot_tables/loot_loader.h
src/gameplay/mechanics/loot_tables/loot_logger.h
src/gameplay/mechanics/loot_tables/loot_tables.h
src/engine/ui/cmd_god/do_loottable.h)

set(HEADERS
src/engine/ui/cmd/do_flee.h
Expand Down Expand Up @@ -1144,6 +1160,19 @@ else ()
message(STATUS "ZLib is turned off. Circle will NOT support MCCP.")
endif ()

# YAML support (for loot tables and world data)
option(HAVE_YAML "Enable YAML support for loot tables configuration." OFF)
if (HAVE_YAML)
find_package(yaml-cpp REQUIRED)
add_definitions(-DHAVE_YAML)
include_directories(${YAML_CPP_INCLUDE_DIRS})
target_link_libraries(circle.library yaml-cpp)
target_sources(circle.library PRIVATE ${LOOT_TABLES_SOURCES} ${LOOT_TABLES_HEADERS})
message(STATUS "YAML is turned ON. Circle will support loot tables and YAML configuration.")
else ()
message(STATUS "YAML is turned off. Loot tables module disabled.")
endif ()

# Iconv
option(HAVE_ICONV "Allows to enable search of iconv." OFF)
if (HAVE_ICONV)
Expand Down
Loading