diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b313e0dc..7365b8e43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,11 +12,7 @@ include(CableToolchains) include(CMakePackageConfigHelpers) include(GNUInstallDirs) -if(EVMC_TESTING OR EVMC_TEST_TOOLS) - # If Hunter is needed it must be initialized before project(hera). - include(evmc/cmake/cable/HunterGate.cmake) - include(evmc/cmake/HunterConfig.cmake) -endif() +include(Hunter/init) cable_configure_toolchain(DEFAULT cxx17-pic) diff --git a/cmake/Hunter/init.cmake b/cmake/Hunter/init.cmake new file mode 100644 index 000000000..a3bc7e378 --- /dev/null +++ b/cmake/Hunter/init.cmake @@ -0,0 +1,12 @@ + +if(EVMC_TESTING OR EVMC_TEST_TOOLS) + set(HUNTER_CONFIGURATION_TYPES Release + CACHE STRING "Build type of the Hunter packages") + + include(HunterGate) + + HunterGate( + URL "https://github.com/ruslo/hunter/archive/v0.23.167.tar.gz" + SHA1 "1d8892545b0d8a52c4ad518f637d6bc33c2a572e" + ) +endif()