OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # libjingle | 3 # libjingle |
4 # Copyright 2015 Google Inc. | 4 # Copyright 2015 Google Inc. |
5 # | 5 # |
6 # Redistribution and use in source and binary forms, with or without | 6 # Redistribution and use in source and binary forms, with or without |
7 # modification, are permitted provided that the following conditions are met: | 7 # modification, are permitted provided that the following conditions are met: |
8 # | 8 # |
9 # 1. Redistributions of source code must retain the above copyright notice, | 9 # 1. Redistributions of source code must retain the above copyright notice, |
10 # this list of conditions and the following disclaimer. | 10 # this list of conditions and the following disclaimer. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 function build_webrtc { | 67 function build_webrtc { |
68 OUTPUT_DIR=$1 | 68 OUTPUT_DIR=$1 |
69 FLAVOR=$2 | 69 FLAVOR=$2 |
70 TARGET_ARCH=$3 | 70 TARGET_ARCH=$3 |
71 if [[ ${TARGET_ARCH} = 'arm' || ${TARGET_ARCH} = 'arm64' ]]; then | 71 if [[ ${TARGET_ARCH} = 'arm' || ${TARGET_ARCH} = 'arm64' ]]; then |
72 FLAVOR="${FLAVOR}-iphoneos" | 72 FLAVOR="${FLAVOR}-iphoneos" |
73 else | 73 else |
74 FLAVOR="${FLAVOR}-iphonesimulator" | 74 FLAVOR="${FLAVOR}-iphonesimulator" |
75 fi | 75 fi |
76 export GYP_DEFINES="OS=ios target_arch=${TARGET_ARCH} clang_xcode=1" | 76 export GYP_DEFINES="OS=ios target_arch=${TARGET_ARCH} use_objc_h264=1 \ |
| 77 clang_xcode=1" |
77 export GYP_GENERATORS="ninja" | 78 export GYP_GENERATORS="ninja" |
78 export GYP_GENERATOR_FLAGS="output_dir=${OUTPUT_DIR}" | 79 export GYP_GENERATOR_FLAGS="output_dir=${OUTPUT_DIR}" |
79 webrtc/build/gyp_webrtc talk/build/merge_ios_libs.gyp | 80 webrtc/build/gyp_webrtc talk/build/merge_ios_libs.gyp |
80 if [[ ${USE_LEGACY_API} -eq 1 ]]; then | 81 if [[ ${USE_LEGACY_API} -eq 1 ]]; then |
81 ninja -C ${OUTPUT_DIR}/${FLAVOR} libjingle_peerconnection_objc_no_op | 82 ninja -C ${OUTPUT_DIR}/${FLAVOR} libjingle_peerconnection_objc_no_op |
82 else | 83 else |
83 ninja -C ${OUTPUT_DIR}/${FLAVOR} webrtc_api_objc_no_op | 84 ninja -C ${OUTPUT_DIR}/${FLAVOR} webrtc_api_objc_no_op |
84 fi | 85 fi |
85 mkdir -p ${LIBRARY_BASE_DIR}/${TARGET_ARCH} | 86 mkdir -p ${LIBRARY_BASE_DIR}/${TARGET_ARCH} |
86 mv ${OUTPUT_DIR}/${FLAVOR}/*.a ${LIBRARY_BASE_DIR}/${TARGET_ARCH} | 87 mv ${OUTPUT_DIR}/${FLAVOR}/*.a ${LIBRARY_BASE_DIR}/${TARGET_ARCH} |
87 } | 88 } |
88 | 89 |
89 # Build all the common architectures. | 90 # Build all the common architectures. |
90 build_webrtc "out_ios_arm" "Release" "arm" | 91 build_webrtc "out_ios_arm" "Release" "arm" |
91 build_webrtc "out_ios_arm64" "Release" "arm64" | 92 build_webrtc "out_ios_arm64" "Release" "arm64" |
92 build_webrtc "out_ios_ia32" "Release" "ia32" | 93 build_webrtc "out_ios_ia32" "Release" "ia32" |
93 build_webrtc "out_ios_x86_64" "Release" "x64" | 94 build_webrtc "out_ios_x86_64" "Release" "x64" |
94 | 95 |
95 popd | 96 popd |
96 | 97 |
97 # Export header files. | 98 # Export header files. |
98 ${EXPORT_HEADERS_SCRIPT} ${WEBRTC_BASE_DIR}/${LIBRARY_BASE_DIR} \ | 99 ${EXPORT_HEADERS_SCRIPT} ${WEBRTC_BASE_DIR}/${LIBRARY_BASE_DIR} \ |
99 ${USE_LEGACY_API} | 100 ${USE_LEGACY_API} |
100 | 101 |
101 # Merge the libraries together. | 102 # Merge the libraries together. |
102 ${MERGE_SCRIPT} ${WEBRTC_BASE_DIR}/${LIBRARY_BASE_DIR} | 103 ${MERGE_SCRIPT} ${WEBRTC_BASE_DIR}/${LIBRARY_BASE_DIR} |
OLD | NEW |