I have a CMake project that creates a DLL from C++ and a C# Windows Forms executable that loads the DLL.
I use the CMake generator: Visual Studio 15 2017 Win64
No matter what I do (one example would be setting compile option: /platform:anycpu
), I cannot get CMake to not have the compile flag: /platform:anycpu32bitpreferred
.
When I opened up the generated VS project in VS2017, it has the "Prefer 32-bit" flag set in the build options.
Is there any way to force CMake to generate my C# project without this flag set? It is causing run-time linking issues unless I use a 32-bit DLL.