NCCA / BlankQtNGL

0 stars 1 forks source link

Qt Library itself will try to reference VCKG by looking for $VCKPG_HOME env var so it is better to check for that one #1

Open Ivansstyle opened 9 months ago

Ivansstyle commented 9 months ago

https://github.com/NCCA/BlankQtNGL/blame/cb77424e4e568211c0e6cc32a4e3446350418ddc/CMakeLists.txt#L4

Setting VCPKG_HOME will trigger Qt to autodetect VCPKG and will set the correct CMAKE_TOOLCHAIN_FILE,

Therefore it is better to check for consistency for VCPKG_ROOT instead of CMAKE_TOOLCHAIN_FILE.

Otherwise, it could be possible to just find Qt first, which will automatically set correct CMAKE_TOOLCHAIN_FILE before checking for it

jmacey commented 9 months ago

I don't get this on the lab machines or my local ones. Does it cause an build issue? The setting of the CMAKE_TOOLCHAIN_FILE is done this way to allow for different version of vcpkg to be used across different projects etc.