assimp will now be correctly built with -O3 or -Og based on build type

pull/2045/head
Doron Adler 2018-06-27 13:26:01 +03:00
parent d79a82faa2
commit 1b7f3de636
1 changed files with 13 additions and 5 deletions

View File

@ -65,6 +65,11 @@ build_arch()
export DEVROOT=$XCODE_ROOT_DIR/Platforms/$IOS_SDK_DEVICE.platform/Developer
export SDKROOT=$DEVROOT/SDKs/$IOS_SDK_DEVICE$IOS_SDK_VERSION.sdk
export CFLAGS="-arch $1 -pipe -no-cpp-precomp -stdlib=$CPP_STD_LIB -isysroot $SDKROOT -I$SDKROOT/usr/include/ -miphoneos-version-min=$IOS_SDK_TARGET"
if [[ "$BUILD_TYPE" =~ "Debug" ]]; then
export CFLAGS="$CFLAGS -Og"
else
export CFLAGS="$CFLAGS -O3"
fi
export LDFLAGS="-arch $1 -isysroot $SDKROOT -L$SDKROOT/usr/lib/"
export CPPFLAGS="$CFLAGS"
export CXXFLAGS="$CFLAGS -std=$CPP_STD"
@ -80,12 +85,15 @@ build_arch()
echo "[!] Building $1 library"
xcrun -run make clean
xcrun -run make assimp -j 8 -l
echo "[!] Moving built libraries into: $BUILD_DIR/$1/"
xcrun -run make assimp -j 8 -l
mv ./lib/*.dylib $BUILD_DIR/$1/
mv ./lib/*.a $BUILD_DIR/$1/
if [[ "$BUILD_SHARED_LIBS" =~ "ON" ]]; then
echo "[!] Moving built dynamic libraries into: $BUILD_DIR/$1/"
mv ./lib/*.dylib $BUILD_DIR/$1/
else
echo "[!] Moving built static libraries into: $BUILD_DIR/$1/"
mv ./lib/*.a $BUILD_DIR/$1/
fi
}
echo "[!] $0 - assimp iOS build script"