Fix macos and windows builds, keep the tools out of the game build

macos: libultraship declares spdlog with OVERRIDE_FIND_PACKAGE so its own
find_package(spdlog REQUIRED) resolves, but torch declares spdlog without
it, and FetchContent_Declare is first-wins. Configuring torch first made
LUS's declaration a no-op and left find_package with no config to find.
It only showed on macos because that's the platform where neither project
finds an installed spdlog -- it's kept out of macports.yml because its fmt
dependency breaks the universal build -- so both fall through to fetching.
Declaring it ahead of both keeps macos on the same source-built v1.16.0 it
used before. Torch already uses OVERRIDE_FIND_PACKAGE for tinyxml2 and
zlib, so the real fix is upstream.

windows: soh builds with /WX, and TorchExtract.cpp is the one translation
unit reaching yaml-cpp through torch's headers, which trips the
dll-interface warnings. Suppress those two on that file.

EXCLUDE_FROM_ALL on soh-torch and soh-o2r-packer: they are build-time
tools, so building the game shouldn't compile them. ExtractAssets and
GenerateSohOtr still pull them in through DEPENDS.

Drops the .gitattributes rule for the prebuilt archive, which is gone.
This commit is contained in:
briaguya
2026-07-25 04:33:01 -04:00
parent 5730fdb73d
commit 4bd6581354
3 changed files with 22 additions and 7 deletions
-5
View File
@@ -1,6 +1 @@
* text=auto eol=lf
# TEMPORARY (Torch migration): checked-in archive. text=auto would almost certainly
# detect this as binary anyway, but an eol conversion on a 4.4 MB zip would corrupt it
# silently, so say so explicitly. Remove with prebuilt/ -- see prebuilt/README.md.
prebuilt/soh.o2r binary