build.sh 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. set -e
  3. IOSSDK_VER="7.0"
  4. # xcodebuild -showsdks
  5. cd framework
  6. xcodebuild -project GPUImage.xcodeproj -target GPUImage -configuration Release -sdk iphoneos${IOSSDK_VER} build
  7. xcodebuild -project GPUImage.xcodeproj -target GPUImage -configuration Release -sdk iphonesimulator${IOSSDK_VER} build
  8. cd ..
  9. cd build
  10. # for the fat lib file
  11. mkdir -p Release-iphone/lib
  12. xcrun -sdk iphoneos lipo -create Release-iphoneos/libGPUImage.a Release-iphonesimulator/libGPUImage.a -output Release-iphone/lib/libGPUImage.a
  13. xcrun -sdk iphoneos lipo -info Release-iphone/lib/libGPUImage.a
  14. # for header files
  15. mkdir -p Release-iphone/include
  16. cp ../framework/Source/*.h Release-iphone/include
  17. cp ../framework/Source/iOS/*.h Release-iphone/include
  18. # Build static framework
  19. mkdir -p GPUImage.framework/Versions/A
  20. cp Release-iphone/lib/libGPUImage.a GPUImage.framework/Versions/A/GPUImage
  21. mkdir -p GPUImage.framework/Versions/A/Headers
  22. cp Release-iphone/include/*.h GPUImage.framework/Versions/A/Headers
  23. ln -sfh A GPUImage.framework/Versions/Current
  24. ln -sfh Versions/Current/GPUImage GPUImage.framework/GPUImage
  25. ln -sfh Versions/Current/Headers GPUImage.framework/Headers