KDE and MADDE

Alexander Neundorf neundorf at kde.org
Sun Nov 20 17:37:54 UTC 2011


On Sunday 20 November 2011, Aleix Pol wrote:
> On 11/20/2011 12:57 PM, Alexander Neundorf wrote:
> > Hi,
> > 
> > I think the short answer is that there is currently no supported way to
> > mix libraries in such a way when crosscompiling.
> > 
> > There are multiple issues.
> > RPATH, configured directories, and probably all that what our Windows
> > developers also suffer from (where the user can change the install
> > directory at install time).
> > 
> > Currently the best way is probably to do it all in scratchbox
> 
> This is not really a problem. It's CMake insisting on using the full
> library path location.

I just had a look.
It has the full absolute path there because we are using absolute paths for 
the install destinations (LIB_INSTALL_DIR).
Back then in 2006 or so when I did this I think it was necessary.
But since some time I came to the conclusion that this is at least now a bad 
idea.
I didn't dare to change this due to compatiblity concerns in all the 4.x 
releases, but this will change with kde frameworks.

Until then, especially that we additionally have a feature-frozen kdelibs now, 
I don't want to change this in FindKDE4Internal.cmake.

If LIB_INSTALL_DIR was a relative path (i.e. simply "lib/"), the path in the 
exported target file would also be relative to its install location.

You may try whether it works better if you change the 

if(WIN32)

around line 786 in FindKDE4Internal.cmake to a 

if(WIN32  OR  CMAKE_CROSSCOMPILING)

so you get the relative install dirs also under Linux.
But for this you have to tell cmake that it is actually cross compiling by 
presetting CMAKE_SYSTEM_NAME to Linux.

If that makes it work, such a patch would be welcome.

Alex


More information about the Kde-mobile mailing list