Aha! Maybe the problem I am facing has a different reason. I am running Visual Studio 2015 on Windows 10.
file (GET_RUNTIME_DEPENDENCIES …)
returns
file Could not resolve file api-ms-win-crt-convert-l1-1-0.dll
Searching for api-ms-win-crt-convert-l1-1-0.dll locates in a multitude of locations, e.g. Appdata or installation directory of MS-Teams, MS-Office, MS-Onedrive, firefox, …
as well as
C:\Programs(x86)\Windows Kits\10\Redist…
C:\Programs(x86)\Microsoft Visual Studio 14.0\Common7.…
As I build with VS2015 I would have expected that cmake locates the DLL in the installation directory of VS2015. Maybe it would even be better if it additionally treats it as something special, i.e. part of a redistributable. This would allow the programmer to decide if he/she wants to add the DLLs to his/her own kit or have it installed via the original Microsoft redistributable package.
With the way it is now I do not know if I should treat unresolved files as error. I could maintain a whitelist. This would force me to update this list with every new VS or redistributable version. This might better be done with cmake. Also I cannot add these files to my install kit because my code does not know where they are located.
Ideas warmely welcome.