cmake: Add SDL dep for Linux dfhack; deprecate BUILD_TESTS
On Linux, libdfhack.so depends on libSDL.so, but that was not marked inside CMake. As it's only used via LD_PRELOAD, there was no problem. But when linking unit tests against it, this becomes necessary. It may be wise to add a find_package(SDL) to provide the user with more control, but just a hard-coded "SDL" should work for most installs. The CTest module creates a BUILD_TESTING option, which clashes (thematically, not in code) with the existing BUILD_TESTS option. Resolve it thus: - Deprecate BUILD_TESTS; it still works, but is marked as an advanced option so it doesn't show in the CMake UI by default. - Add a new BUILD_TEST_SCRIPTS that does what BUILD_TESTS used to do, but is a "dependent" option so it goes away if BUILD_TESTING=OFF. The up-shot is that, by default, the C++ unit tests will be built (BUILD_TESTING=ON) and the Lua integration tests are not installed (BUILD_TEST_SCRIPTS=OFF).develop
parent
face558dd0
commit
8e18d610f5
Loading…
Reference in New Issue