[vlc-commits] contrib: Set _CMAKE_TOOLCHAIN_PREFIX

Martin Storsjö git at videolan.org
Tue Apr 2 14:49:16 CEST 2013


vlc | branch: master | Martin Storsjö <martin at martin.st> | Tue Apr  2 00:08:31 2013 +0300| [4dc5d696d6bc8a3710381408f12285c2347909bb] | committer: Martin Storsjö

contrib: Set _CMAKE_TOOLCHAIN_PREFIX

This is required for detecting ar and ranlib properly, required
e.g. when cross compiling for android from OS X.

One can't set CMAKE_AR or CMAKE_RANLIB directly. Normally they
should be set properly automatically within cmake, but those
codepaths seem to be skipped when we set the C/CXX compilers
manually.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4dc5d696d6bc8a3710381408f12285c2347909bb
---

 contrib/src/main.mak |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 3222f6d..56669b5 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -392,6 +392,9 @@ ifdef HAVE_DARWIN_OS
 	echo "set(CMAKE_CXX_FLAGS $(CFLAGS))" >> $@
 	echo "set(CMAKE_LD_FLAGS $(LDFLAGS))" >> $@
 endif
+ifdef HAVE_CROSS_COMPILE
+	echo "set(_CMAKE_TOOLCHAIN_PREFIX $(HOST)-)" >> $@
+endif
 	echo "set(CMAKE_C_COMPILER $(CC))" >> $@
 	echo "set(CMAKE_CXX_COMPILER $(CXX))" >> $@
 	echo "set(CMAKE_FIND_ROOT_PATH $(PREFIX))" >> $@



More information about the vlc-commits mailing list