Zachary Pincus wrote:
Thanks everyone for your suggestions about how to deal with rpaths (aka install names for OS X dylibs) and installed shared libraries.

Option A is to disable the rpaths and make sure that (1) the libraries are installed in a "standard" location, or (2) [DY] LD_LIBRARY_PATH is set to the installed location. This is possible in any version of CMake with CMAKE_SKIP_RPATH.

Option B is to link two libraries: one for the installed location and one for the build tree location. This is possible with CVS CMake, thanks to Brad's changes.

My questions are now three:

(1) Do you think that A or B is a better solution, in the unix-like OS case?

Several Linux distributions frown upon use of RPATHs. Option A is probably better.

(2) Do either of these solutions have equivalents on Windows machines? Or is the dynamic linker there sufficiently different? If I want to get something working cross-platform, it would be helpful to know what to have to do.

On Windows the "right" thing to do is to install the DLLs in the same directory as the executables. Executables always look in their own directory for the DLLs they need (also in PATH).

(3) Does anyone know if ITK is moving toward a solution for the problem of rpaths in installed shared libs? And if so, what is that solution?

This should be brought up on the ITK developers list (along with question 1).

-Brad
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to