[vlc-devel] [PATCH] Enhance cmake based contribs cross-compilation
olivier at webitup.fr
Wed Jan 25 02:02:50 CET 2012
If I understand correctly, we are able to cross-compile cmake based contribs only for windows and osx targets - because we don't specify a CMAKE_SYSTEM_NAME for anything else (in main.mak).
Actually, this fact does prevent from building correctly at least taglib and musepack from OSX to Linux (compilation partly works, but it fails linking due to cmake thinking this is a native build and trying to use system tools).
It seems the needed fix is just to specify explicitly a CMAKE_SYSTEM_NAME in the toolchain file (http://www.vtk.org/Wiki/CMake_Cross_Compiling)
If that sounds ok, I would like to propose the attached patch.
It should alter the behavior ONLY when cross-compiling to a linux target.
But I guess that might alter things when targeting android, right? In that case, and if that wouldn't be desirable, I guess we could amend the patch to exclude android and keep the current state of affairs for that platform (whatever it is).
What do you think?
The patch is for the master.
Tested on OSX with:
Successfully compiling taglib and musepack for all four.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 844 bytes
Desc: not available
More information about the vlc-devel