Closed rfomin closed 1 year ago
Last time I tried vcpkg, SDL2 DLL from it caused crush at startup, was it fixed?
- If vcpkg doesn't provide install rules for DLLs, they must be provided manually, probably in the same
/lib/DLL/CMakeLists.txt
.
There is an option to provide automatic install, works in Woof:
# X_VCPKG_APPLOCAL_DEPS_INSTALL automatically installs dependencies
# (except SDL_Mixer "plugins"). CMP0077 supress some arcane CMake warning.
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
set(X_VCPKG_APPLOCAL_DEPS_INSTALL ON)
Last time I tried vcpkg, SDL2 DLL from it caused crush at startup, was it fixed?
It works for me, I use it to test resent PRs.
@Dasperal Not relevant to this PR, but I found out how to fix slow libsamplerate from vcpkg, see: https://github.com/fabiangreffrath/woof/commit/cde9dd6aeca1c1d91bd6ddee550714d9e8055ee7
So, what's left:
/lib/DLL/CMakeLists.txt
for transitive dependencies from vcpkg if they exist (SDL_Mixer "plugins").Other questions:
SDL2_DIR
that take effect only in find module.find_package
in the config mode doesn't print any information if it managed to find the package. In the module mode, it displays the version of found package.miniz
from vcpkg?
On Fedora Linux, we probably want to use global miniz
because it can be shared between packages, and have a newer version than the vendored one. But I am not sure about vcpkg, miniz
there is already outdated, and it will be just another DLL for no reason.
- vcpkg install them multiple times, one for each executable, and doesn't print what is installed and where.
This is not a problem for me, in fact I would like to reduce the number of unnecessary messages. I like it when a program prints only error messages or "done". 😄
- Do we want to always prioritize configs over find modules?
We can make option(CMAKE_FIND_PACKAGE_PREFER_CONFIG On)
(I don't remember exact syntax).
- Do we want to use
miniz
from vcpkg?
Personally, I like single-file libraries because we don't have to manage dependencies.
Colleagues, is it release-critical? I'm thinking to release a quad-res update today.
No, it's not release-critical. Just support for another optional building environment.
miniz
over one from vcpkg by default (not include it in vcpkg manifest or building guide).CMAKE_FIND_PACKAGE_PREFER_CONFIG
as a cmake option.VCPKG_MANIFEST_MODE
as a cmake option to let the user choose to operate in manifest mode or classic mode.And while I'm here, update libraries.
I'll leave TODOs for copy target and install rules for now and merge that already done. I probably file a feature request to vcpkg about automatic copy and install of transitive dependencies.
TODOs about SDL2_mixer "plugins" fixed themselves with SDL2_mixer package update in vcpkg
Move FindSDL2* to cmake/SDL2 directory, rename targets.
Add vcpkg.json with dependencies.
The only problem is that the contents of the
base
directory are not copied to the target directory, not sure why.