ianmcook commented on a change in pull request #9855:
URL: https://github.com/apache/arrow/pull/9855#discussion_r608133467



##########
File path: docs/source/developers/cpp/windows.rst
##########
@@ -99,6 +116,52 @@ source.
    from ``conda-forge``. You can examine the installed packages in your
    environment (and their origin) with ``conda list``
 
+Using vcpkg for build dependencies
+========================================
+
+`vcpkg <https://github.com/microsoft/vcpkg>`_ is an open source package manager
+from Microsoft. It hosts community-contributed ports of C and C++ packages and
+their dependencies. Arrow includes a manifest file `cpp/vcpkg.json
+<https://github.com/apache/arrow/blob/master/cpp/vcpkg.json>`_ that specifies
+which vcpkg packages are required to build the C++ library.
+
+To use vcpkg for C++ build dependencies on Windows, first
+`install <https://docs.microsoft.com/en-us/cpp/build/install-vcpkg>`_ and
+`integrate <https://docs.microsoft.com/en-us/cpp/build/integrate-vcpkg>`_
+vcpkg. Then change working directory in ``cmd.exe`` to the root directory
+of Arrow and run the command:
+
+.. code-block:: shell
+
+   vcpkg install ^
+     --triplet x64-windows ^
+     --x-manifest-root cpp  ^
+     --clean-after-build
+
+On Windows, vcpkg builds dynamic link libraries by default. Use the triplet
+``x64-windows-static`` to build static libraries. vcpkg downloads source 
+packages and compiles them locally, so installing dependencies with vcpkg is
+more time-consuming than with conda.
+
+Then in your ``cmake`` command, to use dependencies installed by vcpkg, set:
+
+.. code-block:: shell
+
+   -DARROW_DEPENDENCY_SOURCE=VCPKG
+
+You can optionally set other variables to override the default CMake
+configurations for vcpkg, including:
+   
+* ``-DCMAKE_TOOLCHAIN_FILE``: sets the path to ``vcpkg.cmake``

Review comment:
       Setting `-DCMAKE_TOOLCHAIN_FILE` to anything but a path to `vcpkg.cmake` 
will break the build when using vcpkg, so I would prefer to keep this as is. 
The text above indicates that it's an optional setting that overrides the 
default (which is to automatically find `vcpkg.cmake`).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to