[Insight-users] Re: [CMake] Installed project with shared libs
Brad King
brad.king at kitware.com
Thu Feb 23 16:13:45 EST 2006
Zachary Pincus wrote:
> 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)?
This has already been implemented in the CVS version of CMake.
-Brad
More information about the Insight-users
mailing list