Add condition to turn off the temporary fix on CMake 2.8.12.

CMake/Xcode v2.8.12 appears to have fixed the iOS auto-linking issue. Tested on Xcode 5.
This commit is contained in:
Yao Wei Tjong 姚伟忠 2013-11-04 10:11:24 +08:00
Родитель 9161188398
Коммит a93d3fbf7e
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -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