apple / swift-cmake-examples

Apache License 2.0
99 stars 9 forks source link

Accessing a swift struct from C++ in ping pong #8

Closed afabri closed 2 months ago

afabri commented 2 months ago

I added a struct in the swift file but on the C++ side I get the error message "no type named ....." . I use the latest version of cmake. It would be great if you provided an example for that.

afabri commented 2 months ago

I realise what happens. When I add something in the swift file and run ninja this does not trigger the generation of the bridge code. When I call ninja clean; ninja it works. So this probably needs a fix in one of the CMakeLists.txt