UseSWIG swig_add_library -dllmodule parameter incorrect for csharp
Hi,
this is kind of a follow-up to #21542 (closed)
I only recently noticed there is an issue with the -dllimport
flag generated by swig_add_library
for csharp (I noticed since I generated the .cs files from macOS and not from windows, so I noticed a difference in the generated PINVOKE files).
As I described in #21542 (closed) global::System.Runtime.InteropServices.DllImport
expects the library name without prefix and postfix.
See https://www.mono-project.com/docs/advanced/pinvoke or just this part of the article:
Currently the automatically generated -dllimport
parameter adds $<TARGET_FILE_PREFIX:${target_name}>
while it shouldn't according to global::System.Runtime.InteropServices.DllImport
documentation.