Include the Vcpkg toolchain file after the installation of the first
package.
When building for the first time from a clean source tree, the Vcpkg
toolchain file does not exist. At the same time CMake is only reading
the toolchain file the very first time it is configuring, but since the
toolchain file is only created when vcpkg is configured on the first
call to vcpkg_install it will never read it. So it is not enough to just
reconfigure.
Note: It is not ideal to include it here since one might at some point
install and search for a package at an erlier point in the script and
fail to find it.
Alternative approaces that I considered:
- Include this file right after including AutoVcpkg. This would require
1 recompilation for the file to be found and read which is
unfortunate.
- Include this file in the config function in AutoVcpkg. This seemed
difficult without including the file for every call to vcpkg_install,
which seems unecessary.
AutoVcpkg assumed that the bootstrap file was in the root project
folder, and not in a cmake subfolder.
Note: It is not correct to use ${CMAKE_CURRENT_LIST_DIR} since this is
inside a function and whould still refer to the folder of the calling
file. The more elegant solution would be to use
${CMAKE_CURRENT_FUNCTION_LIST_DIR}, but that is not available until
CMake 3.17.