How can we download Artifacts using CMake from JFrog repository using JFrog key?
We are migrating our build system from Makefile to CMake. We used to upload and download artifacts from JFrog Artifactory using curl as following.
curl -v -X PUT --data-binary @"$localFilePath" "$target" -H "X-JFrog-Art-Api: $apiKey"
Now we are moving to CMake so would like to resolve this dependency using CMake FetchContent module but I didn't find any way to download artifacts using X-JFrog-Art-Api in FetchContent.
The FetchContent argument URL_HASH accepts ALGO=Value where algo can be either variants of SHA or MD5 but their is no way to provide ALGO as X-JFrog-Art-Api.
Any help on this will be greatly appreciated.
I am trying following code to download the artifact from JFrog Artifactory and its failing as X-JFrog-Art-Api is not a valid ALGO in CMake.
FetchContent_Declare(
dependency
URL ${dependency_url}
URL_HASH "X-JFrog-Art-Api=XXXXX"
)