forgottenserver icon indicating copy to clipboard operation
forgottenserver copied to clipboard

Update vcpkg and simplify logic to select Lua interpreter

Open ranisalt opened this issue 2 years ago • 1 comments

Pull Request Prelude

Changes Proposed

Updates vcpkg baseline to download latest versions of Boost (1.81 -> 1.82) and other deps. Meanwhile, since auto-detecting LuaJIT installed is quite complicated when using vcpkg, it's better to leave it for the user to choose.

Generating makefiles using cmake -DUSE_LUAJIT=ON will automatically download and install LuaJIT using vcpkg, otherwise it will use Lua 5.4. For non-vcpkg builds, it will search for LuaJIT or not depending on the flag, instead of trying to be smart.

I changed the testing flag from ENABLE_TESTING to BUILD_TESTING because the latter is the standard used by CTest and the former conflicts with the enable_testing function and quietly hides issues.

Lastly, moved the optional components (Lua, LuaJIT, Boost.Test) to features that are installed by vcpkg when suitable, and removed otherwise. So, if someone will always use LuaJIT, they don't have to have Lua installed through vcpkg, neither have boost-test installed if they are not interested in unit testing.

ranisalt avatar Nov 30 '23 21:11 ranisalt