fts_unity_native_plugin_reloader icon indicating copy to clipboard operation
fts_unity_native_plugin_reloader copied to clipboard

Updated example C++ library to be compatible with MacOS

Open githappens opened this issue 2 years ago • 2 comments

Hi,

I thought it might be useful for some to see how they could prepare their native plugin code to be compatible with both MacOS and Windows. This PR extends the native plugin with an example of just that.

Additionally, I added a CMakeLists.txt so the plugin can be built with CMake on MacOS.

I also added the MacOS binaries to the Plugin folder that I compiled from the example project. I pushed it as a separate commit so the rest of the changes can be cherry picked should you not want to include this binary file in your own repository.

githappens avatar Oct 07 '23 10:10 githappens

Can you update so that CMakeLsits deploys the .dylib into the right location and then removed the pre-compiled .dylib from the repo? Bonus points if you can update it to deploy the .dll as well. I probably should have done that to begin with, eek.

forrestthewoods avatar Oct 08 '23 00:10 forrestthewoods

Good point, I set the output path to the Plugins folder. I only tested it on macOS but it should work on Windows as well. I removed both your Windows and my macOS binaries... let me know if you are fine with that.

githappens avatar Oct 08 '23 01:10 githappens