You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ARROW-11340 enables the use of vcpkg to install Arrow C++ build dependencies, but we should consider making this more straightforward by adding a CMake option ARROW_DEPENDENCY_SOURCE=VCPKG.
Ian Cook / @ianmcook:
Finding where vcpkg is installed and where it has installed packages is not as straightforward as with conda or brew.
If you install vcpkg as per the docs, it does not add the vcpkg install directory to the path, and it does not set any environment variables that help you to find it. However when you run vcpkg integrate install, it creates a plain text file vcpkg.path.txt containing the path of the install directory. On Mac and Linux, this file is placed in $HOME/.vcpkg. On Windows, it's placed in %LOCALAPPDATA%\vcpkg. We should read this path from the file, confirm that the vcpkg executable exists in that path, and if so then set the variable VCPKG_ROOT to that path. Knowing this install path allows us to set the required CMake variable CMAKE_TOOLCHAIN_FILE.
Another way for CMake to find VCPKG_ROOT should be for the user to set it as an environment variable. This will allow it to find vcpkg in cases where the user does not want to run vcpkg integrate install.
vcpkg also puts some other files in the directory at $HOME/.vcpkg or %LOCALAPPDATA%\vcpkg, but the details of those other files are poorly documented and it seems necessary to read the vcpkg source code in https://github.com/microsoft/vcpkg-tool to figure out what they are for.
Within that installed directory, there will be a triplet subdirectory. If the environment variable CMake option VCPKG_DEFAULT_TRIPLET is set, then look for a subdirectory of the installed directory with that name. If that exists, set that name to the triplet. If it does not exist, error. If that env var/CMake option is not set, then assert that there is one and only one subdirectory within the installed directory that is not named vcpkg, and if so, set the triplet to the name of that subdirectory. Set the value of the CMake variable VCPKG_TARGET_TRIPLET to this triplet, and set the value of the CMake variable _VCPKG_INSTALLED_DIR to the installed directory path.
If VCPKG_MANIFEST_MODE is OFF, then do not look for packages in $ARROW_SOURCE_DIR/vcpkg_installed .
Set the value of the CMake variable ARROW_PACKAGE_PREFIX to _VCPKG_INSTALLED_DIR/``VCPKG_TARGET_TRIPLET.
Activity
asfimport commentedon Feb 18, 2021
Ian Cook / @ianmcook:
Finding where vcpkg is installed and where it has installed packages is not as straightforward as with conda or brew.
If you install vcpkg as per the docs, it does not add the vcpkg install directory to the path, and it does not set any environment variables that help you to find it. However when you run
vcpkg integrate install, it creates a plain text filevcpkg.path.txtcontaining the path of the install directory. On Mac and Linux, this file is placed in$HOME/.vcpkg. On Windows, it's placed in%LOCALAPPDATA%\vcpkg. We should read this path from the file, confirm that the vcpkg executable exists in that path, and if so then set the variableVCPKG_ROOTto that path. Knowing this install path allows us to set the required CMake variableCMAKE_TOOLCHAIN_FILE.Another way for CMake to find
VCPKG_ROOTshould be for the user to set it as an environment variable. This will allow it to find vcpkg in cases where the user does not want to runvcpkg integrate install.vcpkg also puts some other files in the directory at
$HOME/.vcpkgor%LOCALAPPDATA%\vcpkg, but the details of those other files are poorly documented and it seems necessary to read the vcpkg source code in https://github.com/microsoft/vcpkg-tool to figure out what they are for.asfimport commentedon Feb 18, 2021
Ian Cook / @ianmcook:
To find where vcpkg has installed packages:
First look in
$ARROW_SOURCE_DIR/vcpkg_installedIf not found there, look in
$VCPKG_ROOT/installedWithin that
installeddirectory, there will be a triplet subdirectory. If the environment variable CMake optionVCPKG_DEFAULT_TRIPLETis set, then look for a subdirectory of theinstalleddirectory with that name. If that exists, set that name to the triplet. If it does not exist, error. If that env var/CMake option is not set, then assert that there is one and only one subdirectory within theinstalleddirectory that is not namedvcpkg, and if so, set the triplet to the name of that subdirectory. Set the value of the CMake variableVCPKG_TARGET_TRIPLETto this triplet, and set the value of the CMake variable_VCPKG_INSTALLED_DIRto theinstalleddirectory path.If
VCPKG_MANIFEST_MODEisOFF, then do not look for packages in$ARROW_SOURCE_DIR/vcpkg_installed.Set the value of the CMake variable
ARROW_PACKAGE_PREFIXto_VCPKG_INSTALLED_DIR/``VCPKG_TARGET_TRIPLET.asfimport commentedon Mar 5, 2021
Kouhei Sutou / @kou:
Issue resolved by pull request 9553
#9553