I plan to write a FLTK find module for my project. So using this module in user code will look like this:
find_package(FLTK <verion> MODULE REQUIRED)
Inside the module, a check will be performed for the availability of the requested version by searching for config file.
Something like this:
unset(FLTK_FIND_VERSION_COMPLETE)
find_package(FLTK CONFIG)
find_package_handle_standard_args(FLTK CONFIG_MODE)
If the requested version is not available, then this module downloads and build FLTK from Github (FetchContent_Declare, FethContent_MakeAvailable).
My question.
Is it idiomatically correct to make downloads from the WEB inside the find module?
Have you seen anything similar in other projects?