Discovered a way to handle library/include paths without hard coding them in the def file, which only works for a static C library. In the build file include paths are passed to the compilerOpts function, and library paths are passed to the extraOpts function: https://gitlab.com/napperley/jmonitor/-/blob/master/build.gradle.kts#L16