Reputation: 29
I'd like to compile (using MSVC 2022
) some third party project (fteqw) that depends on zlib
library. First to generate a solution to open in MSVC i'm using the cmake from the Visual Studio 2022 Developer Command Prompt. I'm getting an error:
The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ZLIB_LIBRARY
linked by target "qtv" in directory D:/Pobrane/fteqw-master
I guess the zlib
library is just missing. The question is there a way to install zlib
package from Visual Studio 2022 Developer Command Prompt like on Linux system using apt-get, yum, etc.?
Upvotes: 0
Views: 165
Reputation: 41147
Another method (lower level and also more complicated) would be to:
Download ZLib from [GitHub]: CristiFati/Prebuilt-Binaries - (master) Prebuilt-Binaries/ZLib /v1
Unpack the .zip file locally (in "C:\Program Files")
When invoking CMake, pass e.g.: -DZLIB_ROOT=C:\Program Files\ZLib\ZLib\1.3.1
(besides all other flags that you might have). It should pick it up from there
Upvotes: 0
Reputation: 4259
Make sure vcpkg is installed in Visual Studio Installer. Use command vcpkg install zlib
.
Install In classic mode, run the following vcpkg command:
vcpkg install zlib
In manifest mode, run the following vcpkg command in your project directory:
vcpkg add port zlib
Reference: vcpkg in CMake projects
Upvotes: 1