Open Jirinrin opened 4 years ago
Did you correctly use vcpkg install {dependencies}
before ?
Yeah, and note how it does work when I add an extra find_package(ZLIB REQUIRED)
to the root CmakeLists.txt file
So I think that FindLibraries.cmake might be not called ? as it as this line inside :/ Can you add a message("Something")
inside to check if it is correctly called
I had the same problem and I fixed it by including "-DVCPKG_TARGET_TRIPLET=x64-windows-static"
as a launch arg with CMake.
Ah sorry Hinara, I forgot to reply ._. But the `-DVCPKG_TARGET_TRIPLET=x64-windows-static" actually works! Thankssss now I don't have to stash this edit to my CMakeLists.txt every time I switch branches :>
Any clue why this makes a difference? (And specifically for ZLIB) What's the default vcpkg target triplet?
I don't really know why specifying the triplet is only required for zlib. The default is x86-windows
. You'd have to ask Drewol or someone more knowledgeable with vcpkg for the first question.
Maybe zlib only accept to compile in static on your system ?
-DVCPKG_TARGET_TRIPLET=x64-window
might also work
It's because as said before on some computers it might try to find 32bit librairies instead of 64bit
On both of my Windows machines, I've always got this error when trying to run
GenerateWin64ProjectFiles.bat
:I've always just fixed this by adding
find_package(ZLIB REQUIRED) on line 17 on the root
CmakeLists.txt`, but surely something must be wrong on a deeper level? And I can't even find any problem with the CMakeLists linking... Does anyone else recognise this problem?