mangosone-server/CMakeLists.txt

268 lines
11 KiB
Text
Raw Normal View History

2026-07-31 00:32:30 +01:00
# SPDX-License-Identifier: GPL-3.0-or-later
#
# MaNGOS is a full featured server for World of Warcraft, supporting
# the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8
2015-05-02 23:20:03 +01:00
#
2026-07-31 00:32:30 +01:00
# Copyright (C) 2005-2026 MaNGOS <https://www.getmangos.eu>
2015-05-02 23:20:03 +01:00
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
2026-07-31 00:32:30 +01:00
# along with this program. If not, see <https://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
# =============================================================================
# Project setup
# =============================================================================
project(MaNGOS VERSION 0.22.0 LANGUAGES C CXX)
2015-05-02 23:20:03 +01:00
United cores Four cores brought to one shape. TERRAIN. src/shared/terrain in all four behind the TerrainInfo seam, and no src/game/vmap anywhere: one baked tile carries ground, liquid, area and collision together. The seam is load-bearing -- the moment the engine learns what a zone is, it can no longer live in shared. A hull has surfaces stacked at one (x, y), so the query is a Column, not a height. SPATIAL. An object no longer owns coordinates: it HAS a Geometry::Placement, read through Where() and mutated through Place(). A placement carries the FRAME it is in, and a cross-frame answer fails closed -- so "same map AND in range" cannot be written wrong, because it is one question. Ground height, line of sight and the free-spot sweep were never geometry and became free functions beside it. MOVEMENT. A generator states an INTENT -- where the mover wants to be -- and a driver realises it. The two were one thing before, so every generator knew how movement is executed and none could be reasoned about alone. An intent resolves in the mover's OWN frame, so chase, follow and a random walk on a deck are computed in deck coordinates without the caller knowing there is a deck, and the pathfinder is handed the map it routes on rather than assuming the world's. TRANSPORTS. The vessel IS a map. A ship's hull is baked as its own map with its own terrain, so a passenger stands on real ground rather than on an offset, and deck-local is the only coordinate system aboard. The server's estimate of a hull's world position is used for one thing only -- finding observers ashore -- and never composed into anything. SD3. The scripts moved onto Where()/Place() and the free functions beside them, so the old coordinate-owning API is not compiled at all in an SD3 build. What remains of the compatibility layer exists for Eluna alone. dep, realmd and SD3 all point at merged upstream. EXTRACTORS. One baker per core, from the client to the caches the server reads, with a Windows GUI in front of it: checkboxes per component, folder and file pickers, a live log. It drives the console tool through its command line and links none of it. Cataclysm's split ADT and its MPQ patch chain are read properly; every core's output is scored against the world database's own ground spawns, 97-99% within two yards. ALSO. Off-thread logging and one startup console. The src/proto network seam, enforced at build time -- game links proto, proto reaches neither game nor the database. C++17 throughout, ACE and G3D gone. One test harness, socket tests behind their own switch. Layout, CI and ignore rules identical across the four. Built with both script engines on GCC, Clang and MSVC. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 19:41:15 +03:00
# Build artefacts never land in the source tree. This is a test, not hygiene:
# sources here still carry relative includes like "../../dep/foo.h", and an
# in-source build tree can make those resolve by accident.
if(CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
message(FATAL_ERROR
"In-source builds are not supported. Configure from a separate build "
"directory, e.g. cmake -S . -B ../build")
endif()
# Use modern CMake policies
cmake_policy(SET CMP0028 NEW)
cmake_policy(SET CMP0048 NEW)
cmake_policy(SET CMP0054 NEW)
cmake_policy(SET CMP0063 NEW)
# CMP0042 = MACOSX_RPATH (macOS only) — optional
if(APPLE)
2026-07-13 20:12:32 +03:00
cmake_policy(SET CMP0042 NEW)
endif()
2015-05-02 23:20:03 +01:00
# =============================================================================
# C++ / C standard configuration
# =============================================================================
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_C_STANDARD 11)
2024-06-05 05:45:42 +03:00
set(CMAKE_C_STANDARD_REQUIRED ON)
# IDE folder organization
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Always export compile_commands.json for tooling
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#==================================================================================
# Define available cmake options below
option(BUILD_MANGOSD "Build the main server" ON)
option(BUILD_REALMD "Build the login server" ON)
United cores Four cores brought to one shape. TERRAIN. src/shared/terrain in all four behind the TerrainInfo seam, and no src/game/vmap anywhere: one baked tile carries ground, liquid, area and collision together. The seam is load-bearing -- the moment the engine learns what a zone is, it can no longer live in shared. A hull has surfaces stacked at one (x, y), so the query is a Column, not a height. SPATIAL. An object no longer owns coordinates: it HAS a Geometry::Placement, read through Where() and mutated through Place(). A placement carries the FRAME it is in, and a cross-frame answer fails closed -- so "same map AND in range" cannot be written wrong, because it is one question. Ground height, line of sight and the free-spot sweep were never geometry and became free functions beside it. MOVEMENT. A generator states an INTENT -- where the mover wants to be -- and a driver realises it. The two were one thing before, so every generator knew how movement is executed and none could be reasoned about alone. An intent resolves in the mover's OWN frame, so chase, follow and a random walk on a deck are computed in deck coordinates without the caller knowing there is a deck, and the pathfinder is handed the map it routes on rather than assuming the world's. TRANSPORTS. The vessel IS a map. A ship's hull is baked as its own map with its own terrain, so a passenger stands on real ground rather than on an offset, and deck-local is the only coordinate system aboard. The server's estimate of a hull's world position is used for one thing only -- finding observers ashore -- and never composed into anything. SD3. The scripts moved onto Where()/Place() and the free functions beside them, so the old coordinate-owning API is not compiled at all in an SD3 build. What remains of the compatibility layer exists for Eluna alone. dep, realmd and SD3 all point at merged upstream. EXTRACTORS. One baker per core, from the client to the caches the server reads, with a Windows GUI in front of it: checkboxes per component, folder and file pickers, a live log. It drives the console tool through its command line and links none of it. Cataclysm's split ADT and its MPQ patch chain are read properly; every core's output is scored against the world database's own ground spawns, 97-99% within two yards. ALSO. Off-thread logging and one startup console. The src/proto network seam, enforced at build time -- game links proto, proto reaches neither game nor the database. C++17 throughout, ACE and G3D gone. One test harness, socket tests behind their own switch. Layout, CI and ignore rules identical across the four. Built with both script engines on GCC, Clang and MSVC. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 19:41:15 +03:00
option(BUILD_TOOLS "Build the client-data extractor" ON)
option(WITH_TESTS "Build the unit tests" OFF)
option(WITH_NET_TESTS "Build the socket tests (slow; never in CI)" OFF)
option(SCRIPT_LIB_ELUNA "Compile with support for Eluna scripts" ON)
option(SCRIPT_LIB_SD3 "Compile with support for ScriptDev3 scripts" ON)
option(PLAYERBOTS "Enable Player Bots" OFF)
option(SOAP "Enable remote access via SOAP" OFF)
option(PCH "Enable precompiled headers" ON)
United cores Four cores brought to one shape. TERRAIN. src/shared/terrain in all four behind the TerrainInfo seam, and no src/game/vmap anywhere: one baked tile carries ground, liquid, area and collision together. The seam is load-bearing -- the moment the engine learns what a zone is, it can no longer live in shared. A hull has surfaces stacked at one (x, y), so the query is a Column, not a height. SPATIAL. An object no longer owns coordinates: it HAS a Geometry::Placement, read through Where() and mutated through Place(). A placement carries the FRAME it is in, and a cross-frame answer fails closed -- so "same map AND in range" cannot be written wrong, because it is one question. Ground height, line of sight and the free-spot sweep were never geometry and became free functions beside it. MOVEMENT. A generator states an INTENT -- where the mover wants to be -- and a driver realises it. The two were one thing before, so every generator knew how movement is executed and none could be reasoned about alone. An intent resolves in the mover's OWN frame, so chase, follow and a random walk on a deck are computed in deck coordinates without the caller knowing there is a deck, and the pathfinder is handed the map it routes on rather than assuming the world's. TRANSPORTS. The vessel IS a map. A ship's hull is baked as its own map with its own terrain, so a passenger stands on real ground rather than on an offset, and deck-local is the only coordinate system aboard. The server's estimate of a hull's world position is used for one thing only -- finding observers ashore -- and never composed into anything. SD3. The scripts moved onto Where()/Place() and the free functions beside them, so the old coordinate-owning API is not compiled at all in an SD3 build. What remains of the compatibility layer exists for Eluna alone. dep, realmd and SD3 all point at merged upstream. EXTRACTORS. One baker per core, from the client to the caches the server reads, with a Windows GUI in front of it: checkboxes per component, folder and file pickers, a live log. It drives the console tool through its command line and links none of it. Cataclysm's split ADT and its MPQ patch chain are read properly; every core's output is scored against the world database's own ground spawns, 97-99% within two yards. ALSO. Off-thread logging and one startup console. The src/proto network seam, enforced at build time -- game links proto, proto reaches neither game nor the database. C++17 throughout, ACE and G3D gone. One test harness, socket tests behind their own switch. Layout, CI and ignore rules identical across the four. Built with both script engines on GCC, Clang and MSVC. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 19:41:15 +03:00
option(WITH_IO_URING "Use the io_uring network backend (Linux, needs liburing)" OFF)
option(DEBUG "Enable debug build (only on non IDEs)" OFF)
option(WITHOUT_GIT "Disable Git revision detection" OFF)
#==================================================================================
2015-05-02 23:20:03 +01:00
message("")
message(
"This script builds the MaNGOS server.
Options that can be used in order to configure the process:
General:
CMAKE_INSTALL_PREFIX Path where the server should be installed to
BUILD_MANGOSD Build the main server
BUILD_REALMD Build the login server
United cores Four cores brought to one shape. TERRAIN. src/shared/terrain in all four behind the TerrainInfo seam, and no src/game/vmap anywhere: one baked tile carries ground, liquid, area and collision together. The seam is load-bearing -- the moment the engine learns what a zone is, it can no longer live in shared. A hull has surfaces stacked at one (x, y), so the query is a Column, not a height. SPATIAL. An object no longer owns coordinates: it HAS a Geometry::Placement, read through Where() and mutated through Place(). A placement carries the FRAME it is in, and a cross-frame answer fails closed -- so "same map AND in range" cannot be written wrong, because it is one question. Ground height, line of sight and the free-spot sweep were never geometry and became free functions beside it. MOVEMENT. A generator states an INTENT -- where the mover wants to be -- and a driver realises it. The two were one thing before, so every generator knew how movement is executed and none could be reasoned about alone. An intent resolves in the mover's OWN frame, so chase, follow and a random walk on a deck are computed in deck coordinates without the caller knowing there is a deck, and the pathfinder is handed the map it routes on rather than assuming the world's. TRANSPORTS. The vessel IS a map. A ship's hull is baked as its own map with its own terrain, so a passenger stands on real ground rather than on an offset, and deck-local is the only coordinate system aboard. The server's estimate of a hull's world position is used for one thing only -- finding observers ashore -- and never composed into anything. SD3. The scripts moved onto Where()/Place() and the free functions beside them, so the old coordinate-owning API is not compiled at all in an SD3 build. What remains of the compatibility layer exists for Eluna alone. dep, realmd and SD3 all point at merged upstream. EXTRACTORS. One baker per core, from the client to the caches the server reads, with a Windows GUI in front of it: checkboxes per component, folder and file pickers, a live log. It drives the console tool through its command line and links none of it. Cataclysm's split ADT and its MPQ patch chain are read properly; every core's output is scored against the world database's own ground spawns, 97-99% within two yards. ALSO. Off-thread logging and one startup console. The src/proto network seam, enforced at build time -- game links proto, proto reaches neither game nor the database. C++17 throughout, ACE and G3D gone. One test harness, socket tests behind their own switch. Layout, CI and ignore rules identical across the four. Built with both script engines on GCC, Clang and MSVC. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 19:41:15 +03:00
BUILD_TOOLS Build the client-data extractor
2015-05-02 23:20:03 +01:00
SOAP Enable remote access via SOAP
PCH Enable use of precompiled headers
United cores Four cores brought to one shape. TERRAIN. src/shared/terrain in all four behind the TerrainInfo seam, and no src/game/vmap anywhere: one baked tile carries ground, liquid, area and collision together. The seam is load-bearing -- the moment the engine learns what a zone is, it can no longer live in shared. A hull has surfaces stacked at one (x, y), so the query is a Column, not a height. SPATIAL. An object no longer owns coordinates: it HAS a Geometry::Placement, read through Where() and mutated through Place(). A placement carries the FRAME it is in, and a cross-frame answer fails closed -- so "same map AND in range" cannot be written wrong, because it is one question. Ground height, line of sight and the free-spot sweep were never geometry and became free functions beside it. MOVEMENT. A generator states an INTENT -- where the mover wants to be -- and a driver realises it. The two were one thing before, so every generator knew how movement is executed and none could be reasoned about alone. An intent resolves in the mover's OWN frame, so chase, follow and a random walk on a deck are computed in deck coordinates without the caller knowing there is a deck, and the pathfinder is handed the map it routes on rather than assuming the world's. TRANSPORTS. The vessel IS a map. A ship's hull is baked as its own map with its own terrain, so a passenger stands on real ground rather than on an offset, and deck-local is the only coordinate system aboard. The server's estimate of a hull's world position is used for one thing only -- finding observers ashore -- and never composed into anything. SD3. The scripts moved onto Where()/Place() and the free functions beside them, so the old coordinate-owning API is not compiled at all in an SD3 build. What remains of the compatibility layer exists for Eluna alone. dep, realmd and SD3 all point at merged upstream. EXTRACTORS. One baker per core, from the client to the caches the server reads, with a Windows GUI in front of it: checkboxes per component, folder and file pickers, a live log. It drives the console tool through its command line and links none of it. Cataclysm's split ADT and its MPQ patch chain are read properly; every core's output is scored against the world database's own ground spawns, 97-99% within two yards. ALSO. Off-thread logging and one startup console. The src/proto network seam, enforced at build time -- game links proto, proto reaches neither game nor the database. C++17 throughout, ACE and G3D gone. One test harness, socket tests behind their own switch. Layout, CI and ignore rules identical across the four. Built with both script engines on GCC, Clang and MSVC. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 19:41:15 +03:00
WITH_TESTS Build the unit tests (target: mangos_tests)
WITH_NET_TESTS Build the socket tests as well. Disjoint from WITH_TESTS,
off by default, and deliberately not run in CI: they bind
real sockets and dominate the suite's wall-clock time.
DEBUG Debug build, only for systems without IDE (Linux, *BSD)
WITHOUT_GIT Disable Git revision detection
2015-05-02 23:20:03 +01:00
Scripting engines:
SCRIPT_LIB_ELUNA Compile with support for Eluna scripts
2017-01-04 15:05:06 +00:00
SCRIPT_LIB_SD3 Compile with support for ScriptDev3 scripts
Modules:
PLAYERBOTS Enable Player Bots
To set an option simply type -D<OPTION>=<VALUE> after 'cmake <srcs>'.
Also, you can specify the generator with -G. See 'cmake --help' for more details
For example: cmake .. -DCMAKE_INSTALL_PREFIX=/opt/mangos -DSCRIPT_LIB_SD3=0"
2015-05-02 23:20:03 +01:00
)
message("")
#==================================================================================#
2015-05-02 23:20:03 +01:00
# =============================================================================
# Build type logic
# =============================================================================
if(NOT CMAKE_CONFIGURATION_TYPES)
if(DEBUG)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE)
else()
set(CMAKE_BUILD_TYPE Release CACHE STRING "" FORCE)
endif()
2015-05-02 23:20:03 +01:00
endif()
# =============================================================================
# Install paths
# =============================================================================
include(GNUInstallDirs)
2015-05-02 23:20:03 +01:00
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}_install CACHE PATH "Default install directory" FORCE)
endif()
if(UNIX)
set(BIN_DIR "${CMAKE_INSTALL_FULL_BINDIR}")
set(CONF_INSTALL_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}")
2015-05-02 23:20:03 +01:00
else()
set(BIN_DIR "${CMAKE_INSTALL_PREFIX}")
set(CONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
2015-05-02 23:20:03 +01:00
endif()
# =============================================================================
# Runtime library search path (RPATH)
# =============================================================================
if(APPLE)
set(CMAKE_INSTALL_RPATH "@loader_path/../lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
elseif(UNIX)
set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
endif()
# =============================================================================
# Dependencies
# =============================================================================
# =============================================================================
# Include project CMake modules safely (relative to current dir)
# =============================================================================
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
if(NOT WITHOUT_GIT)
find_package(Git QUIET)
endif()
find_package(Threads REQUIRED)
find_package(OpenSSL 3.0 REQUIRED)
# OpenSSL 4.x support is intentionally deferred until the OpenSSL 4.2 LTS migration.
if(OPENSSL_VERSION VERSION_GREATER_EQUAL "4.0.0")
message(FATAL_ERROR
"Unsupported OpenSSL ${OPENSSL_VERSION}: MaNGOS currently requires >=3.0.0 and <4.0.0")
endif()
find_package(MySQL REQUIRED)
# =============================================================================
# OpenSSL policy
#
# Every OpenSSL decision lives here, in two interface targets:
#
# mangos_openssl - what to link against and where the headers live.
# Linked PUBLIC by anything exposing OpenSSL types in
# its own headers (`shared`), so consumers inherit it.
#
# mangos_openssl_strict - the API level we hold ourselves to. Together these
# two definitions delete the *declarations* of
# everything OpenSSL deprecated up to 3.0 -- the
# low-level MD5_*, SHA1_*, HMAC_CTX and SSLeay_*
# families. Reaching for the old API is then a
# compile error rather than a warning nobody reads.
#
# Link it PRIVATE, always. It must not leak into
# targets that still use the old API: the realmd
# submodule (which reaches us through `shared`) and
# the vendored code under dep/.
# =============================================================================
add_library(mangos_openssl INTERFACE)
target_link_libraries(mangos_openssl
INTERFACE
OpenSSL::SSL
OpenSSL::Crypto
)
add_library(mangos_openssl_strict INTERFACE)
target_compile_definitions(mangos_openssl_strict
INTERFACE
OPENSSL_API_COMPAT=0x30000000L
OPENSSL_NO_DEPRECATED
)
United cores Four cores brought to one shape. TERRAIN. src/shared/terrain in all four behind the TerrainInfo seam, and no src/game/vmap anywhere: one baked tile carries ground, liquid, area and collision together. The seam is load-bearing -- the moment the engine learns what a zone is, it can no longer live in shared. A hull has surfaces stacked at one (x, y), so the query is a Column, not a height. SPATIAL. An object no longer owns coordinates: it HAS a Geometry::Placement, read through Where() and mutated through Place(). A placement carries the FRAME it is in, and a cross-frame answer fails closed -- so "same map AND in range" cannot be written wrong, because it is one question. Ground height, line of sight and the free-spot sweep were never geometry and became free functions beside it. MOVEMENT. A generator states an INTENT -- where the mover wants to be -- and a driver realises it. The two were one thing before, so every generator knew how movement is executed and none could be reasoned about alone. An intent resolves in the mover's OWN frame, so chase, follow and a random walk on a deck are computed in deck coordinates without the caller knowing there is a deck, and the pathfinder is handed the map it routes on rather than assuming the world's. TRANSPORTS. The vessel IS a map. A ship's hull is baked as its own map with its own terrain, so a passenger stands on real ground rather than on an offset, and deck-local is the only coordinate system aboard. The server's estimate of a hull's world position is used for one thing only -- finding observers ashore -- and never composed into anything. SD3. The scripts moved onto Where()/Place() and the free functions beside them, so the old coordinate-owning API is not compiled at all in an SD3 build. What remains of the compatibility layer exists for Eluna alone. dep, realmd and SD3 all point at merged upstream. EXTRACTORS. One baker per core, from the client to the caches the server reads, with a Windows GUI in front of it: checkboxes per component, folder and file pickers, a live log. It drives the console tool through its command line and links none of it. Cataclysm's split ADT and its MPQ patch chain are read properly; every core's output is scored against the world database's own ground spawns, 97-99% within two yards. ALSO. Off-thread logging and one startup console. The src/proto network seam, enforced at build time -- game links proto, proto reaches neither game nor the database. C++17 throughout, ACE and G3D gone. One test harness, socket tests behind their own switch. Layout, CI and ignore rules identical across the four. Built with both script engines on GCC, Clang and MSVC. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 19:41:15 +03:00
# Network backend selection. Detection lives here, beside the option, rather than in
# src/shared: the result is read by the build summary at the end of this file, and a
# set() made inside a subdirectory would not be visible up here.
#
set(MANGOS_USE_IO_URING OFF)
if(WITH_IO_URING AND UNIX AND NOT APPLE)
find_library(URING_LIBRARY NAMES uring)
find_path(URING_INCLUDE_DIR NAMES liburing.h)
if(URING_LIBRARY AND URING_INCLUDE_DIR)
set(MANGOS_USE_IO_URING ON)
message(STATUS "Networking backend: io_uring (${URING_LIBRARY})")
else()
message(WARNING "WITH_IO_URING was requested but liburing was not found; "
"falling back to the epoll reactor.")
endif()
endif()
find_package(ZLIB QUIET)
find_package(BZip2 QUIET)
2015-05-02 23:20:03 +01:00
# dep/lualib (the Lua build used by Eluna) links against readline by its bare
# library name and is not itself touched here; find_package(Readline) below
# declares a GLOBAL IMPORTED target literally named `readline` (see
# cmake/FindReadline.cmake) before that subdirectory is added, so its
# existing bare-name references resolve to a properly-detected library
# instead of an unqualified linker search. Readline has no Windows build and
# is only needed when Eluna is being built.
if(NOT WIN32 AND SCRIPT_LIB_ELUNA)
find_package(Readline REQUIRED)
endif()
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/GenRevision.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/EnsureVersion.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/MangosParams.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/SetDefinitions.cmake)
United cores Four cores brought to one shape. TERRAIN. src/shared/terrain in all four behind the TerrainInfo seam, and no src/game/vmap anywhere: one baked tile carries ground, liquid, area and collision together. The seam is load-bearing -- the moment the engine learns what a zone is, it can no longer live in shared. A hull has surfaces stacked at one (x, y), so the query is a Column, not a height. SPATIAL. An object no longer owns coordinates: it HAS a Geometry::Placement, read through Where() and mutated through Place(). A placement carries the FRAME it is in, and a cross-frame answer fails closed -- so "same map AND in range" cannot be written wrong, because it is one question. Ground height, line of sight and the free-spot sweep were never geometry and became free functions beside it. MOVEMENT. A generator states an INTENT -- where the mover wants to be -- and a driver realises it. The two were one thing before, so every generator knew how movement is executed and none could be reasoned about alone. An intent resolves in the mover's OWN frame, so chase, follow and a random walk on a deck are computed in deck coordinates without the caller knowing there is a deck, and the pathfinder is handed the map it routes on rather than assuming the world's. TRANSPORTS. The vessel IS a map. A ship's hull is baked as its own map with its own terrain, so a passenger stands on real ground rather than on an offset, and deck-local is the only coordinate system aboard. The server's estimate of a hull's world position is used for one thing only -- finding observers ashore -- and never composed into anything. SD3. The scripts moved onto Where()/Place() and the free functions beside them, so the old coordinate-owning API is not compiled at all in an SD3 build. What remains of the compatibility layer exists for Eluna alone. dep, realmd and SD3 all point at merged upstream. EXTRACTORS. One baker per core, from the client to the caches the server reads, with a Windows GUI in front of it: checkboxes per component, folder and file pickers, a live log. It drives the console tool through its command line and links none of it. Cataclysm's split ADT and its MPQ patch chain are read properly; every core's output is scored against the world database's own ground spawns, 97-99% within two yards. ALSO. Off-thread logging and one startup console. The src/proto network seam, enforced at build time -- game links proto, proto reaches neither game nor the database. C++17 throughout, ACE and G3D gone. One test harness, socket tests behind their own switch. Layout, CI and ignore rules identical across the four. Built with both script engines on GCC, Clang and MSVC. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 19:41:15 +03:00
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/SubmoduleCompat.cmake)
2015-05-02 23:20:03 +01:00
if(PCH)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/PCHSupport.cmake)
endif()
# =============================================================================
# Subdirectories
# =============================================================================
United cores Four cores brought to one shape. TERRAIN. src/shared/terrain in all four behind the TerrainInfo seam, and no src/game/vmap anywhere: one baked tile carries ground, liquid, area and collision together. The seam is load-bearing -- the moment the engine learns what a zone is, it can no longer live in shared. A hull has surfaces stacked at one (x, y), so the query is a Column, not a height. SPATIAL. An object no longer owns coordinates: it HAS a Geometry::Placement, read through Where() and mutated through Place(). A placement carries the FRAME it is in, and a cross-frame answer fails closed -- so "same map AND in range" cannot be written wrong, because it is one question. Ground height, line of sight and the free-spot sweep were never geometry and became free functions beside it. MOVEMENT. A generator states an INTENT -- where the mover wants to be -- and a driver realises it. The two were one thing before, so every generator knew how movement is executed and none could be reasoned about alone. An intent resolves in the mover's OWN frame, so chase, follow and a random walk on a deck are computed in deck coordinates without the caller knowing there is a deck, and the pathfinder is handed the map it routes on rather than assuming the world's. TRANSPORTS. The vessel IS a map. A ship's hull is baked as its own map with its own terrain, so a passenger stands on real ground rather than on an offset, and deck-local is the only coordinate system aboard. The server's estimate of a hull's world position is used for one thing only -- finding observers ashore -- and never composed into anything. SD3. The scripts moved onto Where()/Place() and the free functions beside them, so the old coordinate-owning API is not compiled at all in an SD3 build. What remains of the compatibility layer exists for Eluna alone. dep, realmd and SD3 all point at merged upstream. EXTRACTORS. One baker per core, from the client to the caches the server reads, with a Windows GUI in front of it: checkboxes per component, folder and file pickers, a live log. It drives the console tool through its command line and links none of it. Cataclysm's split ADT and its MPQ patch chain are read properly; every core's output is scored against the world database's own ground spawns, 97-99% within two yards. ALSO. Off-thread logging and one startup console. The src/proto network seam, enforced at build time -- game links proto, proto reaches neither game nor the database. C++17 throughout, ACE and G3D gone. One test harness, socket tests behind their own switch. Layout, CI and ignore rules identical across the four. Built with both script engines on GCC, Clang and MSVC. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 19:41:15 +03:00
if(WITH_TESTS OR WITH_NET_TESTS)
set(BUILD_TESTING ON)
enable_testing()
2026-07-13 20:12:32 +03:00
endif()
United cores Four cores brought to one shape. TERRAIN. src/shared/terrain in all four behind the TerrainInfo seam, and no src/game/vmap anywhere: one baked tile carries ground, liquid, area and collision together. The seam is load-bearing -- the moment the engine learns what a zone is, it can no longer live in shared. A hull has surfaces stacked at one (x, y), so the query is a Column, not a height. SPATIAL. An object no longer owns coordinates: it HAS a Geometry::Placement, read through Where() and mutated through Place(). A placement carries the FRAME it is in, and a cross-frame answer fails closed -- so "same map AND in range" cannot be written wrong, because it is one question. Ground height, line of sight and the free-spot sweep were never geometry and became free functions beside it. MOVEMENT. A generator states an INTENT -- where the mover wants to be -- and a driver realises it. The two were one thing before, so every generator knew how movement is executed and none could be reasoned about alone. An intent resolves in the mover's OWN frame, so chase, follow and a random walk on a deck are computed in deck coordinates without the caller knowing there is a deck, and the pathfinder is handed the map it routes on rather than assuming the world's. TRANSPORTS. The vessel IS a map. A ship's hull is baked as its own map with its own terrain, so a passenger stands on real ground rather than on an offset, and deck-local is the only coordinate system aboard. The server's estimate of a hull's world position is used for one thing only -- finding observers ashore -- and never composed into anything. SD3. The scripts moved onto Where()/Place() and the free functions beside them, so the old coordinate-owning API is not compiled at all in an SD3 build. What remains of the compatibility layer exists for Eluna alone. dep, realmd and SD3 all point at merged upstream. EXTRACTORS. One baker per core, from the client to the caches the server reads, with a Windows GUI in front of it: checkboxes per component, folder and file pickers, a live log. It drives the console tool through its command line and links none of it. Cataclysm's split ADT and its MPQ patch chain are read properly; every core's output is scored against the world database's own ground spawns, 97-99% within two yards. ALSO. Off-thread logging and one startup console. The src/proto network seam, enforced at build time -- game links proto, proto reaches neither game nor the database. C++17 throughout, ACE and G3D gone. One test harness, socket tests behind their own switch. Layout, CI and ignore rules identical across the four. Built with both script engines on GCC, Clang and MSVC. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 19:41:15 +03:00
# Not the submodule's own CMakeLists: this fork decides which dependencies it
# builds, and with what gating. See cmake/Dependencies.cmake.
include(Dependencies)
2026-07-13 20:12:32 +03:00
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/CMakeLists.txt")
add_subdirectory(src)
else()
message(WARNING "Source directory 'src' not found. Nothing to build.")
endif()
# =============================================================================
# Final info and summary
# =============================================================================
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/StatusInfo.cmake)