hunter_configΒΆ

This command will choose which version of package to build exactly:

hunter_config(
    <PackageName>
    VERSION 1.2.8-hunter # Version from "project/<ProjectName>/hunter.cmake"
    CMAKE_ARGS OPTION1=OFF OPTION2=ON # Arguments that will be forwarded to CMake build command (optional)
)

OPTION1=OFF and OPTION2=ON will be used to build your third-party package. This is similar to ExternalProject_Add command sub-option CMAKE_ARGS. In the case above Hunter-engine will build this package something like this:

> cmake -H. -B_builds -DOPTION1=OFF -DOPTION2=ON
> cmake --build _builds --target install

Instead of using VERSION you can create source archive by packing Git submodule:

hunter_config(<PackageName> GIT_SUBMODULE "3rdparty/<PackageName>")