|
|
@@ -34,9 +34,11 @@ cmake -E make_directory $BUILD
|
|
|
# Create project with the Xcode generator
|
|
|
cmake -E chdir $BUILD cmake -G "Xcode" $@ $SOURCE
|
|
|
|
|
|
-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,
|
|
|
+# Temporary fix: can be removed when CMake minimum required has reached 2.8.12
|
|
|
+if [ "$1" == "-DIOS=1" -a -e $BUILD/CMakeScripts/XCODE_DEPEND_HELPER.make ]; then
|
|
|
+ # Due to a bug in the CMake/Xcode generator (prior to version 2.8.12) 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
|
|
|
+ # Since version 2.8.12 CMake does not generate XCODE_DEPEND_HELPER.make script anymore, so we skip this fix when the script does not exist
|
|
|
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
|