Trying to download a public file from SharePoint via CMake's FetchContent. My URL is like the following:
https://myorg.sharepoint.com/:u:/s/myfolder/EdajXJq3IV5HrSs9bKhEFoYByaMZHBYHyftA9GKLAGZ5wA?e=QPdu1N&Download=1
Note I added &Download=1 to the path given by SharePoint to access the file directly. However, my link gets redirect every time I use it. I'm able to download the file using wget & curl:
curl -v -L --cookie tmp.cookie 'https://link.from.above' --output myfile.txtwget 'https://link.from.above'
Now trying do the same using CMake:
FetchContent_Declare(${MY_TARGET}
URL ${FILE_URL}
)
But that doesn't work. I guess it has something to do with redirection / cookies.