Commit 750aedbd authored by Rafaël Carré's avatar Rafaël Carré

contrib: avoid cmake rewriting gcc sysroot on Darwin

parent c17e507a
......@@ -410,6 +410,12 @@ endif
endif
ifdef HAVE_CROSS_COMPILE
echo "set(_CMAKE_TOOLCHAIN_PREFIX $(HOST)-)" >> $@
ifdef HAVE_ANDROID
# cmake will overwrite our --sysroot with a native (host) one on Darwin
# Set it to "" right away to short-circuit this behaviour
echo "set(CMAKE_CXX_SYSROOT_FLAG \"\")" >> $@
echo "set(CMAKE_C_SYSROOT_FLAG \"\")" >> $@
endif
endif
echo "set(CMAKE_C_COMPILER $(CC))" >> $@
echo "set(CMAKE_CXX_COMPILER $(CXX))" >> $@
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment