Loading a library from a script

This worked nicely. The only downside was that the entire absolute path needed to be added. Does ROOT following environment variable for where to find headers and libraries? Something similar to gcc’s INCLUDE_PATH, CPLUS_INCLUDE_PATH and LIBRARY_PATH?

I am generating the rootmap files as I am using the cmake macro ROOT_GENERATE_LIBRARY (which I have an issue with, but will not discuss here). I’m not sure how to use these files, it seems they need to be placed somewhere in particular? Remember I am trying to develop this for others to use so the idea is that a cmake file would properly place all the files in the correct places and the user would have to do very little to get it working.

Thanks for the responses so far, they are helpful.