Skip to content
Ruslan Baratov edited this page Apr 20, 2015 · 14 revisions

hunter_pick_scheme

This command used to pick a download scheme for current project and called before hunter_download in project/<ProjectName>/hunter.cmake module:

hunter_pick_scheme(
    DEFAULT default_scheme_name # this scheme will be used by default
    COMBINED combined_scheme_name # this scheme will be used for multi-configuration generators
    IPHONEOS ios_scheme_name # this scheme will be used to build for iOS platform
    WINDOWS windows_scheme # this scheme will be used on windows
)

Examples:

# This is regular cmake project
hunter_pick_scheme(
    DEFAULT url_sha1_release_debug
    COMBINED url_sha1_combined_release_debug
)
# This is no-install (unpack only) project
hunter_pick_scheme(DEFAULT url_sha1_no_install)
# Boost bjam 
hunter_pick_scheme(
    DEFAULT url_sha1_boost_library
    IPHONEOS url_sha1_boost_ios_library
)
# OpenSSL
hunter_pick_scheme(
    DEFAULT url_sha1_openssl
    IPHONEOS url_sha1_openssl_ios
    WINDOWS url_sha1_openssl_windows
)

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

Clone this wiki locally