CPack External generator: Invalid json package file
If using "External" as cpack generator together with CPACK_EXTERNAL_PACKAGE_SCRIPT then the generated .json file is not completely written if read from that script. It seems a 'flush' is needed if json is written before calling CPACK_EXTERNAL_PACKAGE_SCRIPT.
Edited by Steffen Roeber