Hunter C/C++ CMake package manager gained an easy setup mechanism via CMake’s FetchContent
.
For Qt6’s Core dependencies one needs only to do:
cmake_minimum_required(VERSION 3.14)
set(HUNTER_PACKAGES freetype ZLIB PNG double-conversion pcre2)
set(HUNTER_pcre2_CMAKE_ARGS
PCRE2_BUILD_PCRE2_8=OFF
PCRE2_BUILD_PCRE2_16=ON
PCRE2_BUILD_PCRE2_32=OFF
PCRE2_SUPPORT_JIT=ON)
include(FetchContent)
FetchContent_Declare(SetupHunter GIT_REPOSITORY https://github.com/cpp-pm/gate)
FetchContent_MakeAvailable(SetupHunter)
project(3rdparty)
For more information see https://github.com/cpp-pm/gate