We use the Slicer Execution Model stuff from Slicer3 for command line processing. This lets Slicer3 load our programs as modules and generate user interface panels.
This works really slick EXCEPT for this issue: the utility GenerateCLP which is needed to convert the command line description XML to C++ header builds shared, and depends on a shared library libModuleDescriptionParser.so. This means that GenerateCLP now will not work unless you add the directory containing the shared library to LD_LIBRARY_PATH For a while I just changed the ModuleDescriptionParser CMakeLists.txt so that it built the library static, but then I ran into a problem with that: When I needed to link the ModuleDescriptionParser library into one of my own shared libraries, the link failed because the static library wasn't compiled for position-independent code (i.e. -fPIC for gcc). So I found the trick to build both the shared and static versions in the FAQ, but GenerateCLP links to the shared version of the library when I want it to link to the static version. Is there a way in CMake to tell it to link GenerateCLP to link preferentially to the static version of the library? Oh the thousands of man-months that get expended wrestling with shared libraries .... _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake