this effectively overrides the CMAKE EXPAT_WARNINGS_AS_ERRORS to be
treated as always OFF. since we currently add -Werror at the top-level
CMakeLists.txt file, that variable was previously effectively always ON.
Unless we want to be on the hook for solving libexpat build warnings, I
believe this way will avoid unnecessary build breakages for users.
- Confirmed that libexpat is built statically and linked with xlsxreader
- May need da7cda3a85 for Windows
- Although libexpat's CMake options are all prefixed with LIBEXPAT_, it also adds some cache entries like SIZE_T (from expat/ConfigureChecks.cmake). Unsure if these affect other libs.
- xlsxio may need additional reconfiguration after moving to add_subdirectory() to find libexpat/libzip on non-Linux platforms.
The dependencies introduced in #1620 cause an error when building natively on Windows, according to @ragundo. CMake is looking for build tools `v100`, which are part of VS2010 and won't work with DF/DFHack, even if they were installed.
Some of the Windows build scripts pass in `-T v140_xp` (from VS2015), so passing this option through to subprojects may help: https://cmake.org/cmake/help/latest/variable/CMAKE_GENERATOR_TOOLSET.html
This makes jsoncpp a submodule that can be build directly from git
sources. This changes depends/jsoncpp to depends/jsoncpp-sub to avoid
filename conflict if someone tries to use git bisect.
jsoncpp library name changes to jsoncpp_lib_static.
jsoncpp version is the latest tagged release.
As best as I can tell, the copy of tinyxml dfhack uses is unmodified
from whenever it was first bundled. This commit adds an option to CMake,
EXTERNAL_TINYXML, that if set to ON, will attempt to link against a system
tinyxml instead of using the dfhack-bundled one. It defaults to OFF,
so there is no change in default behavior.
The DFHACK_TINYXML variable is then set to either "tinyxml" or "dfhack-tinyxml"
so the library (and any plugins that need updating) can link against one
or the other.
The FindTinyXML.cmake script was taken from https://github.com/ros/cmake_modules
(licensed under the 3-clause BSD license).
Add license text to new CMake file.