port(2A): port/common Win32 layer, port_logic target and header gate
- Win32Types.h: fixed-width Win32 scalars, pointer-sized handles, static_asserts
- Win32Crt.{h,cpp}: MSVC _snprintf truncation contract, stricmp, timeGetTime wrap
- port_logic static lib linked into libmtgodot; standalone MTGODOT_BUILD_PORT build
- port_header_gate: every port/**.h compiles alone (twice) with its lib's
40250 Distribute|Win32 defines (NDEBUG, USE_LOD, _DISTRIBUTE)
- script/port_gate.sh: macOS/Android/iOS/Windows(mingw) PASS, Linux BLOCKED
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
option(MTGODOT_BUILD_EXTENSION "Build the Godot GDExtension (pulls in godot-cpp)" ON)
|
||||
option(MTGODOT_BUILD_TOOLS "Build libgr2 validation tools (gr2dump/gr2fuzz/oracle_diff)" OFF)
|
||||
option(MTGODOT_BUILD_NET_TOOLS "Build host-only protocol probes without Godot" OFF)
|
||||
option(MTGODOT_BUILD_PORT "Build only port_logic (with MTGODOT_BUILD_EXTENSION=OFF), e.g. for Linux/Windows" OFF)
|
||||
|
||||
# --- shared, cross-platform core (no godot-cpp, no third-party) ---
|
||||
add_subdirectory(libgr2)
|
||||
@@ -71,3 +72,9 @@ if(MTGODOT_BUILD_NET_TOOLS AND NOT MTGODOT_BUILD_EXTENSION)
|
||||
add_executable(net_classic_e2e_host extension/tools/net_classic_e2e.cpp)
|
||||
target_link_libraries(net_classic_e2e_host PRIVATE mtnet_host)
|
||||
endif()
|
||||
|
||||
# port_logic has no Godot dependency. On targets without an extension build (Linux, Windows) it is
|
||||
# built on its own so the 2A gate (header self-containment, static_asserts) runs per platform.
|
||||
if(MTGODOT_BUILD_PORT AND NOT MTGODOT_BUILD_EXTENSION)
|
||||
add_subdirectory(extension/src/port)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user