Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[cmake] Crossguid offline url override #10948
Crossguid offline url override
When attempting to build offline crossguid will still attempt to download even when you override the URL. It also does not generate the full path for you. Updated it so it will override the URL the same way as ffmpeg and libdvd.
I could also be assuming something here but trying to use it like ffmpeg/libdvd. If so just reject this PR!
Motivation and Context
Would like to override the URL for offline building.
How Has This Been Tested?
Test by -DCROSSGUID_URL=foo.tar.bz2 then make crossguid and see that it still downloads the tar ball. With the change, it wont download anymore! (Though it'll fail unless you have a foo.tar.bz2 as the real crossguild tar ball!)
Screenshots (if appropriate):
Types of change
Sorry, it's almost AM here and I'm not sure I understand the problem. What do you mean by a non full path? Are you only passing the filename?
Again, don't fully understand what you mean but I presume you want to check if files exists:
Thanks for taking the time to look into this. CMake is very much a work in progress and all input is welcome. Ideally we should cache downloaded files and look in there first. Not quite there yet.
Non-full path meaning a non absolute path (relative path). So where ever your root CMakeLists.txt file is
Crossguild url fails, and ffmpeg url works.
Could be some cached download which for the absolute path would be:
This issue is:
Will fail since that file does not exists, which means ill need to know the full absolute path from the command line. So it would be better if we did it like ffmpeg and libdvd (in FindFFMPEG.cmake) you give a relative path, which then cmake builds the absolute path with:
Which is what Ive done here. So now you can use a relative path based on the root CMakeLists.txt vs knowing an absolute path from the command line
Also why do we need to check if the file exists to fall back? The override is usually manually done, soo if they give an incorrect path, error out. That seems fair to me (otherwise it might be confusing if they are not paying attention and then use the downloaded version vs the one they are attempting to override with)