Exporting multiple libraries from the same package
I have a package (simple_message) that builds a library, that is then used by other packages. I would now like to build two versions of that library (one with some additional functionality). I am able to build the two versions using some compiler switches and defining them in the CMakeLists. To allow other packages to use the library I haved added the following to the manifest file:
<export> <cpp cflags="-I${prefix}/include -DROS=1" lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -lsimple_message"/> </export>
My problem is how do I add the second library. I could add it to the manifest as part of the export tags, but how will other packages specify which version of the library they want to use?
How do you know which library instance you want to use?
Why don't you create a Stack and put each library on a different package inside the same stack?
Martin, the different packages would need to build against a common source. The differences between the packages would be in a low level, common source file. Right now, I use compiler flags to alter the source file.