Hi folks,

For the first time ever, I actually installed ITK (built with shard libs) as opposed to using it from the build directory.

After installing ITK, I moved the build directory and tried to build and run a project that uses ITK. The project built fine, because the linker saw the installed dylibs. However, the project won't run, because the rpaths in the installed dylibs were paths to the build directory, not the install directory. Thus dyld can't find the itk libraries.

It seems like this issue will arise with any CMake-driven project, and not just ITK. So, in its current state, can CMake be used to create shared libs that work properly when installed? I know that CMake just got custom rpath support (thanks Brad!), so I'm curious as to what ITK (or any CMake project that installs shared libs) would need to do to support this.

It seems like two copies of the libs would have to be linked: one for use in the build dir, and one InstallOnly copy, with the correct install rpath. Is this correct? Is there an easier/better solution (preferably cross-platform)?

Thanks,

Zach
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to