Commit 54af86fa authored by Felix Paul Kühne's avatar Felix Paul Kühne

Clean the environment before running xcodebuild to fix linking for macOS

parent af0067c7
......@@ -178,8 +178,28 @@ info()
echo "[${green}info${normal}] $1"
}
cleantheenvironment()
{
export AS=""
export CCAS=""
export ASCPP=""
export CC=""
export CFLAGS=""
export CPPFLAGS=""
export CXX=""
export CXXFLAGS=""
export CXXCPPFLAGS=""
export OBJC=""
export OBJCFLAGS=""
export LD=""
export LDFLAGS=""
export STRIP=""
}
buildxcodeproj()
{
cleantheenvironment
local target="$2"
local PLATFORM="$3"
......@@ -214,6 +234,7 @@ buildxcodeproj()
if [ "$SCARY" = "no" ]; then
defs="$defs NOSCARYCODECS"
fi
xcodebuild -project "$1.xcodeproj" \
-target "$target" \
-sdk $PLATFORM$SDK \
......@@ -319,7 +340,7 @@ buildLibVLC() {
PREFIX="${VLCROOT}/install-${OSSTYLE}${PLATFORM}/${ACTUAL_ARCH}"
TARGET="${ARCH}-apple-darwin14"
# clean the environment
# partially clean the environment
export CFLAGS=""
export CPPFLAGS=""
export CXXFLAGS=""
......@@ -725,6 +746,8 @@ buildLibVLC() {
buildMobileKit() {
PLATFORM="$1"
cleantheenvironment
if [ "$SKIPLIBVLCCOMPILATION" != "yes" ]; then
if [ "$TVOS" = "yes" ]; then
# this variable is read by libvlc's contrib build script
......
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