[CMake] Windows rpath emulation
Nils Gladitz
nilsgladitz at gmail.com
Sat Sep 20 17:53:38 EDT 2014
On 20.09.2014 23:31, Roland Schulz wrote:
> Hi,
>
> it would be nice if there were a way to emulate rpath under Windows.
> As far as I can see there are two possible approaches:
> - Generate a shell script which sets PATH
> - Generate a manifest for the application and a manifest for the
> dependencies.
> http://sourceforge.net/p/mingw-w64/mailman/message/30019971/ has an
> example of how to do it.
>
> To generate either the script or the manifest, all paths to the all
> required libraries need to be queried for an executable target. Then
> those paths could be put into the script/manifest with e.g.
> coonfigure_file. Those paths correspond to those used to set the rpath.
I suppose it might be slightly more complex given that the import
library that is being linked to and the DLL that corresponds to the
import library might not be in the same location (and cmake might know
the location of the one but not always the location of the the other).
> This functionality has been suggested in this issue:
> http://www.cmake.org/Bug/bug_relationship_graph.php?bug_id=10449
> The issue has been suspended with a comment that this idea, needs more
> discussion on the mailing list first.
Brad probably meant the developer's rather than the user's mailing list.
(I am sending this reply to both)
Nils
More information about the CMake
mailing list