We have a vendor C API that we are currently trying to wrap in Julia. I just have their headers and a dynamic library. Presently I am using ] generate to create new projects because of the way that our source is stored. We store everyone’s work in one gigantic git repo, so I am not sure that I can use PkgTemplates in a “no git repo” situation.
I looked around at other projects, like Interpolations and thought that a subdirectory like ./ext might be appropriate to store the *.so in? After that, I was thinking of hard-coding the path to the *.so into a global variable in the main Julia file:
neatlib::String = "../ext/libneat.so"
NOT my idea, and sooner or later I’ll convince “them” to change it. ↩︎
To follow up, let me explain that .so files are usually distributed in a package artifact, and in turn these artifacts are usually listed in a JLL package, which you then list as a dependency of your Julia package. This way, when you load your Julia package, the JLL automatically grabs the correct .so file for the current platform.
JLL packages and their artifacts, in turn, are usually generated by a BinaryBuilder script. The easiest way to do this, at least for open-source software, is to make a pull request to the Yggdrasil repository, which will automatically run your script to generate cross-compiled binaries for all supported Julia platforms, and will then automatically upload and register the JLL package.