Hi there, There is a pretty neat feature that comes within CMake: SharedForward.h.in. Basically it let you create a relocatable application (with a main function) on all system supported by CMake.
The issue for me, is that it really rely on the main function and the argv param, which I do not have access to since I need to do similar work from within a python module. Therefore I implemented a more general framework for creating relocatable binaries that do not need a main function and argv. Steps: cd /tmp svn co https://gdcm.svn.sourceforge.net/svnroot/gdcm/Sandbox/RelocatableModule mkdir dummy cd dummy ccmake ../RelocatableModule make warning by default cmake will use rpath, so simply: make install once it is installed , you can simply move the executable around and it should always gives you the correct path where it is located. for now I only tested on the system I have access to: MSVC, Cygwin and Linux debian. I am looking for feedbacks from people running a system different that those. If I get enough testers and feedback, I'll integrate the feature in CMake. Thanks a bunch ! -- Mathieu _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
