7 ms·
I tried vcpkg recently and I was pleasantly surprised! The Win installation [1] (assuming VS is already present) was pretty easy. I tested by running `vcpkg in
by emmanueloga_ 6y ago
I tried vcpkg recently and I was pleasantly surprised!
The Win installation [1] (assuming VS is already present) was pretty easy. I tested by running `vcpkg install glfw3` and copy-pasted an example from the web into VS2019. The example ran with _zero_ configuration!
Is the experience as nice in Linux or Mac?
1: https://github.com/microsoft/vcpkg#quick-start-windows https://github.com/microsoft/vcpkg#quick-start-windows
- pjmlp 6y agoI focus mostly on Windows, but given that even Google is integrating Android's NDK with vcpkg, I guess it works quite alright.
- quietbritishjim 6y agoYes, the experience is just as nice on Linux, assuming you're using CMake to generate your Makefile. When you run the cmake generate command, you just need to add one option to specify the location of your vcpkg directory. Of course the same applies on Windows if you're using CMake to generate your Visual Studio project, except that you'll probably want to specify the triplet on the command line too (the default one is 32-bit). Footnote: If you're doing this on Windows and want static linking then the experience is less smooth. You still need to specify the vcpkg directory and triplet (x64-windows-static), but that doesn't automatically change your application's CRT to the static one (which all your libraries are now assuming). There are a couple of ways round this but the easiest is probably to use MSVC_RUNTIME_LIBRARY CMake property (requires at least CMake 3.15, which is pretty new). [1] https://cmake.org/cmake/help/v3.15/prop_tgt/MSVC_RUNTIME_LIBRARY.html https://cmake.org/cmake/help/v3.15/prop_tgt/MSVC_RUNTIME_LIB...