|
@@ -22,21 +22,17 @@
|
|
|
|
|
|
|
|
# Ensure we are in project root directory
|
|
# Ensure we are in project root directory
|
|
|
cd $( dirname $0 )
|
|
cd $( dirname $0 )
|
|
|
-SOURCE=`pwd`/Source
|
|
|
|
|
|
|
|
|
|
# Create out-of-source build directory
|
|
# Create out-of-source build directory
|
|
|
-cmake -E make_directory Build
|
|
|
|
|
-
|
|
|
|
|
-# Remove existing CMake cache and rules
|
|
|
|
|
-rm -rf Build/CMakeCache.txt Build/CMakeFiles
|
|
|
|
|
-# Do cleanup one more time for old build directory created by previous version of cmake_macosx.sh, just in case
|
|
|
|
|
-rm -rf {../build,.,build}/CMakeCache.txt {../build,.,build}/CMakeFiles
|
|
|
|
|
|
|
+SOURCE=`pwd`/Source
|
|
|
|
|
+BUILD=Build
|
|
|
|
|
+if [ $1 == "-DIOS=1" ]; then
|
|
|
|
|
+ BUILD=ios-Build
|
|
|
|
|
+fi
|
|
|
|
|
+cmake -E make_directory $BUILD
|
|
|
|
|
|
|
|
# Create project with the Xcode generator
|
|
# Create project with the Xcode generator
|
|
|
-cmake -E chdir Build cmake -G "Xcode" $@ $SOURCE
|
|
|
|
|
-
|
|
|
|
|
-# Below temporary fix may no longer be required by newer version of CMake
|
|
|
|
|
-sed -i.bak 's/lastKnownFileType = sourcecode; name = "as_callfunc_arm_xcode.S"/lastKnownFileType = sourcecode.asm; name = "as_callfunc_arm_xcode.S"/g' Build/*.xcodeproj/project.pbxproj
|
|
|
|
|
|
|
+cmake -E chdir $BUILD cmake -G "Xcode" $@ $SOURCE
|
|
|
|
|
|
|
|
# Apple always uses OpenGL
|
|
# Apple always uses OpenGL
|
|
|
sed 's/OpenGL/Direct3D9/g' Docs/Doxyfile.in >Doxyfile
|
|
sed 's/OpenGL/Direct3D9/g' Docs/Doxyfile.in >Doxyfile
|
|
@@ -44,8 +40,8 @@ sed 's/OpenGL/Direct3D9/g' Docs/Doxyfile.in >Doxyfile
|
|
|
if [ $1 == "-DIOS=1" ]; then
|
|
if [ $1 == "-DIOS=1" ]; then
|
|
|
# Due to a bug in the CMake/Xcode generator where it has wrongly assumed the IOS bundle structure to be the same as MacOSX bundle structure,
|
|
# Due to a bug in the CMake/Xcode generator where it has wrongly assumed the IOS bundle structure to be the same as MacOSX bundle structure,
|
|
|
# below temporary fix is required in order to solve the auto-linking issue when dependent libraries are changed
|
|
# below temporary fix is required in order to solve the auto-linking issue when dependent libraries are changed
|
|
|
- sed -i.bak 's/\/Contents\/MacOS//g' Build/CMakeScripts/XCODE_DEPEND_HELPER.make
|
|
|
|
|
- echo -e "\tsed -i.bak 's/\/Contents\/MacOS//g' CMakeScripts/XCODE_DEPEND_HELPER.make" >> Build/CMakeScripts/ReRunCMake.make
|
|
|
|
|
|
|
+ sed -i.bak 's/\/Contents\/MacOS//g' $BUILD/CMakeScripts/XCODE_DEPEND_HELPER.make
|
|
|
|
|
+ echo -e "\tsed -i.bak 's/\/Contents\/MacOS//g' CMakeScripts/XCODE_DEPEND_HELPER.make" >> $BUILD/CMakeScripts/ReRunCMake.make
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
# vi: set ts=4 sw=4 expandtab:
|
|
# vi: set ts=4 sw=4 expandtab:
|