CPack broken for Windows/NSIS for CMake 3.17.*: "ReserveFile /plugin" results in script error
CPack is broken for Windows/NSIS for CMake 3.17+.
The error message in NSISOutput.log when attempting to build the "package" target using NSIS or NSIS64 generators:
Usage: ReserveFile [/nonfatal] [/r] [/x filespec [...]] file [file...] Error in script ".../_CPack_Packages/win64/NSIS/project.nsi" on line 633 -- aborting creation process
Line 633 in project.nsi is:
ReserveFile /plugin 'UserInfo.dll'
That line was added during this change.
The problem affects 3.17.*; 3.16 versions works correctly.
This issue was observed on Windows 10 x64.