| 
									
										
										
										
											2019-07-01 22:32:56 +02:00
										 |  |  | #!/usr/bin/env bash
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | source ../scripts/build_helper.sh | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | library_path="DataPipes" | 
					
						
							|  |  |  | requires_rebuild ${library_path} | 
					
						
							|  |  |  | [[ $? -eq 0 ]] && exit 0 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-04 18:00:03 +02:00
										 |  |  | if [[ ${build_os_type} != "win32" ]]; then | 
					
						
							|  |  |  |     cd DataPipes/ | 
					
						
							| 
									
										
										
										
											2019-07-01 22:32:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-04 18:00:03 +02:00
										 |  |  |     #echo "Testing for libnice" | 
					
						
							|  |  |  |     #dpkg-query -l libnice-dev2 &>/dev/null | 
					
						
							|  |  |  |     #if [[ $? -ne 0 ]]; then | 
					
						
							|  |  |  |     #    echo "Installing libnice" | 
					
						
							|  |  |  |     #    sudo apt-get update | 
					
						
							|  |  |  |     #    sudo apt-get install -yes --force-yes libnice-dev | 
					
						
							|  |  |  |     #else | 
					
						
							|  |  |  |     #    echo "libnice already installed" | 
					
						
							|  |  |  |     #fi | 
					
						
							| 
									
										
										
										
											2019-07-02 20:00:28 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-04 18:00:03 +02:00
										 |  |  |     echo "Building dependencies" | 
					
						
							|  |  |  |     ./build_usrsctp.sh | 
					
						
							|  |  |  |     check_err_exit ${library_path} "Failed to build usrsctp!" | 
					
						
							|  |  |  |     ./build_srtp.sh | 
					
						
							|  |  |  |     check_err_exit ${library_path} "Failed to build srtp!" | 
					
						
							|  |  |  |     ./build_sdptransform.sh | 
					
						
							|  |  |  |     check_err_exit ${library_path} "Failed to build sdptransform!" | 
					
						
							|  |  |  |     cd .. | 
					
						
							|  |  |  | fi | 
					
						
							| 
									
										
										
										
											2019-07-01 22:32:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-04 18:00:03 +02:00
										 |  |  | _cxx_options="" | 
					
						
							|  |  |  | [[ ${build_os_type} != "win32" ]] && _cxx_options="-fPIC -static-libgcc -static-libstdc++" | 
					
						
							|  |  |  | [[ ${build_os_type} == "win32" ]] && _cxx_options="-DWIN32" | 
					
						
							|  |  |  | cmake_build ${library_path} -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED=OFF -DCrypto_ROOT_DIR="`pwd`/boringssl/" -DCRYPTO_TYPE="boringssl" -DCMAKE_CXX_FLAGS="${_cxx_options}" -DBUILD_TESTS=OFF -DBUILD_WEBRTC=OFF -DMSVC_RUNTIME=static | 
					
						
							| 
									
										
										
										
											2019-07-01 22:32:56 +02:00
										 |  |  | check_err_exit ${library_path} "Failed to build DataPipes!" | 
					
						
							|  |  |  | set_build_successful ${library_path} |