I install the GTK packages with:
vcpkg install gtk:x64-windows
I also set the environment variable CMAKE_TOOLCHAIN_FILE
to C:\vcpkg\scripts\buildsystems\vcpkg.cmake
, but find_package
can't find GTK. How do I find GTK in CMake?
Have you made sure to run .\vcpkg integrate install
via Powershell-Admin after you have built GTK? Are you building your project with the x64-windows
triplet defined (VCPKG_TARGET_TRIPLET)?
^ Once you do that, delete CMakeCache, and/or test regeneration to another folder and try Configuring again.
On the CMake side, check that your CMakeLists has find_package (GTK)
somewhere in there as well. You'll probably also have to define GTK_INCLUDE_DIR
and link GTK via target_link_libraries
on the CMake side.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With