I need to give the compiler a path that's relative to my Nimble package. But it keeps interpreting it as relative to whatever directory the current source file is in. I added this to my nim.cfg file in the package root dir:
--cincludes:"../../include/"
When I run nimble test, the build fails because the include path is wrong: it's been constructed relative to the tests subdirectory, not the package root.
I've seen the variable $projectDir used in other places so I thought that might fix it, but this doesn't work either:
--cincludes:"$projectDir/../../include/"
<gripe>I can't find any real documentation of nim.cfg files. The compiler docs describe how they're located but doesn't explain their syntax or features. Some of the examples show all sorts of compiler-specific properties, but there's no description nor list of them. And then there's NimScript and config.nims, which is different (because it's a full Nim interpreter?) It's all pretty confusing.</gripe>