Index: talk/build/build_ios_libs.sh |
diff --git a/talk/build/build_ios_libs.sh b/talk/build/build_ios_libs.sh |
index 0ee112cc41a49c768fe27d7e97aaa4189e6f3681..8dc01b91dff02d5dfbbf4c220460aa5bf92c6587 100755 |
--- a/talk/build/build_ios_libs.sh |
+++ b/talk/build/build_ios_libs.sh |
@@ -52,6 +52,13 @@ if [[ ! -x ${MERGE_SCRIPT} ]]; then |
exit 1 |
fi |
+# Check for list of header files. |
+HEADERS=${SCRIPT_DIR}/headers.txt |
+if [[ ! -e ${HEADERS} ]]; then |
+ echo "Failed to find list of headers." >&2 |
+ exit 1 |
+fi |
+ |
pushd ${WEBRTC_BASE_DIR} |
LIBRARY_BASE_DIR="out_ios_libs" |
@@ -59,7 +66,6 @@ function build_webrtc { |
OUTPUT_DIR=$1 |
FLAVOR=$2 |
TARGET_ARCH=$3 |
- TARGET_SUBARCH=$4 |
if [[ ${TARGET_ARCH} = 'arm' || ${TARGET_ARCH} = 'arm64' ]]; then |
FLAVOR="${FLAVOR}-iphoneos" |
else |
@@ -74,12 +80,23 @@ function build_webrtc { |
mv ${OUTPUT_DIR}/${FLAVOR}/*.a ${LIBRARY_BASE_DIR}/${TARGET_ARCH} |
} |
+function copy_headers { |
+ LIST_OF_HEADERS=$1 |
+ INCLUDE_BASE_DIR=$2 |
+ while read -r HEADER_PATH || [[ -n "$HEADER_PATH" ]]; do |
+ ditto ${HEADER_PATH} ${INCLUDE_BASE_DIR}/${HEADER_PATH} |
+ done < ${LIST_OF_HEADERS} |
+} |
+ |
# Build all the common architectures. |
build_webrtc "out_ios_arm" "Release" "arm" |
build_webrtc "out_ios_arm64" "Release" "arm64" |
build_webrtc "out_ios_ia32" "Release" "ia32" |
build_webrtc "out_ios_x86_64" "Release" "x64" |
+# Copy header files. |
+copy_headers ${HEADERS} ${LIBRARY_BASE_DIR}/include |
tkchin_webrtc
2016/02/05 15:57:59
Can we do this in a .py instead? And place both th
hjon_webrtc
2016/02/10 21:41:15
Done.
|
+ |
popd |
# Merge the libraries together. |