Hello,
I'm about to include some Nim code into my CMake with C++. I managed to get most of it going; one thing I couldn't find though is a way to resolve Nim include path. The nim compiler generates an interface header file for me to use; however, it, in turn, depends on including a Nim library header, the path to which is system-dependent.
Is there a way to print the include path, the equivalent of what pkg-config does?
% pkg-config python-3.9 --cflags-only-I
-I/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9
I can see that nim dump shows some data, but it's not easily formatted for reusing it
Thanks, George.
You can get the path to the Nim stdlib with:
Nim --hints:off --eval:"import std/compilesettings; echo querySetting(libPath)"
but maybe there's a better way