CPack/NuGet: Warning NU5128
Reading the NuGet document page does not seems to provide a way to avoid the following warning:
cmake --build build --target package --config Release [...] EXEC : warning : NU5128: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder do not have exact matches in the other location. Consult the list of actions below: [C:
Users\mmalaterre\projects\CMake-Nuget\build\package.vcxproj]
Per documentation upstream:
So all I would be missing seems to be something like this:
<package>
<metadata>
...
<dependencies>
<group targetFramework=".NETFramework4.7.2" />
</dependencies>
</metadata>
...
</package>
However cmake/NuGet only expose:
set(CPACK_NUGET_PACKAGE_DEPENDENCIES "targetFramework")
set(CPACK_NUGET_PACKAGE_DEPENDENCIES_targetFramework_VERSION "net5.0")
which gets exposed as:
<dependencies>
<dependency id="targetFramework" version="net5.0" />
</dependencies>
So please extend, CPack/NuGet to handle warning NU5128.