Vcpkg installs SOIL2 library error and its solution

Today, because I want to read pictures, install the SOIL2 library of OpenGL. However, the performance given by vcpkg was not satisfactory, so I recorded my solution.

The first is that it cannot be downloaded, because the source website has been migrated to Github, and the source site is now empty, with only one readme:
Insert picture description here

We need to manually download from SOIL2's GitHub, here is the download address: https://github.com/SpartanJ/SOIL2/releases

Download according to the target version displayed when the vcpkg install command is executed. Here is the 1.11 version:
Insert picture description here

Download the tar.gz file and place it in the download directory under the vcpkg installation directory.

Then we check the name of the temporary file in download/temp under the vcpkg installation directory, we rename the downloaded tar.gz file to the name of this temporary file, and then start again vcpkg install SOIL2

If nothing happens, the system will find the file at this time, but it will throw a hash check error (displayed in the console, here I forgot to take the screenshot...) The error message will tell us the hash of the package we downloaded Value, and the desired hash value.

The solution is also very simple. We change the expected hash value in the prortfile.cmake under the ports/soil2 directory under the vcpkg installation directory to the hash value of the package we downloaded to pass the verification.

Insert picture description here

Note: You can use vcpkg hash xxx to hash the file xxx, the default algorithm is SHA512.

Start again vcpkg install SOIL2, the installation is successful:

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_44176696/article/details/110289659