The generated target ends up executing:
$ cmake \
-DPRINT_license_FILE_NAME=/path/to/licenses.txt \
-DPRINT_license_PACKAGES="...;CURL;..." \
... \
-DCURL_SOURCE_DIR=""
And emits a warning:
WARNING: no license files found for package "CURL" in .
IMO, the target should simply not emit a warning in this cases. CURL has come from a pre-existing system installation, so it won't have a source dir, and therefore no LICENSE to emit?