2
0
Эх сурвалжийг харах

Temporary fix to work around Xcode generator bug for target installation.

Yao Wei Tjong 姚伟忠 12 жил өмнө
parent
commit
017891d1e7
1 өөрчлөгдсөн 9 нэмэгдсэн , 2 устгасан
  1. 9 2
      cmake_macosx.sh

+ 9 - 2
cmake_macosx.sh

@@ -39,8 +39,15 @@ if [ "$1" == "-DIOS=1" -a -e $BUILD/CMakeScripts/XCODE_DEPEND_HELPER.make ]; the
     # 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
+    sed -i '' 's/\/Contents\/MacOS//g' $BUILD/CMakeScripts/XCODE_DEPEND_HELPER.make
+fi
+
+# Temporary fix: known CMake bug (still exists in 2.8.12)
+if [ "$1" == "-DIOS=1" ]; then
+    # Due to a bug in the CMake/Xcode generator that prevents iOS targets (library and bundle) to be installed correctly
+    # (see http://public.kitware.com/Bug/bug_relationship_graph.php?bug_id=12506&graph=dependency),
+    # below temporary fix is required to work around the bug
+    sed -i '' 's/$(EFFECTIVE_PLATFORM_NAME)//g' $BUILD/CMakeScripts/install_postBuildPhase.make*
 fi
 
 # vi: set ts=4 sw=4 expandtab: