I am developing a ROOT plugin for a plugin-based application framework. For classes that need it, I am generating a dictionary via
ROOT_GENERATE_DICTIONARY(G__example include/example.h MODULE example LINKDEF include/ExampleLinkDef.h)
Which produces:
libexample_rdict.pcm libexample.rootmap libexample.so module.modulemap
So far so good. However I need to tell ROOT where to find these. It is only able to find them if I copy them in the working directory, which is inconvenient for deployment (every plugin is supposed to be self contained in its folder).
Is there a way to set a search path for these files? Either absolute or relative to the position of the .so would work…
I only found TSystem::AddIncludePath and TSystem::AddDynamicPath in the documentation, neither of which does what I want.
Thank you, I’m assuming there is no way to do it directly from c++ then?
I’m a bit hesitant to mess with environment variables for this purpose because it breaks the “encapsulation” of our plugins. I could call setenv from inside the ROOT plugin(s) but I’m not sure I can do this before ROOT looks at the content of the variable. Can you tell me when that happens?