Updated DP script
This commit is contained in:
parent
edf2012caf
commit
5406c8d7ec
@ -1,16 +1,42 @@
|
|||||||
cd DataPipes/
|
[[ -z "${build_helper_file}" ]] && {
|
||||||
sudo apt-get install libnice-dev
|
echo "Missing build helper file. Please define \"build_helper_file\""
|
||||||
./build_usrsctp.sh
|
exit 1
|
||||||
./build_srtp.sh
|
}
|
||||||
./build_sdptransform.sh
|
source ${build_helper_file}
|
||||||
if [[ -d build ]]; then
|
[[ $build_helpers_defined -ne 1 ]] && {
|
||||||
rm -rf build
|
echo "Failed to include build helpers."
|
||||||
fi
|
|
||||||
mkdir build
|
|
||||||
cd build || {
|
|
||||||
echo "Failed to enter build dir"
|
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
cmake .. -DCrypto_ROOT_DIR="../../boringssl/" -DCRYPTO_TYPE="boringssl" -DCMAKE_CXX_FLAGS="-fPIC -static-libgcc -static-libstdc++ ${CXX_FLAGS}" -DBUILD_TESTS=OFF -DCMAKE_C_FLAGS="${C_FLAGS} -fPIC" -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" ${CMAKE_OPTIONS} -DLIBNICE_PREBUILD_PATH="../libnice/linux_${build_os_arch}" -DGLIBC_PREBUILD_PATH="../glibc/linux_${build_os_arch}" -DBUILD_STATIC=0 -DBUILD_SHARED=1
|
|
||||||
make ${CMAKE_MAKE_OPTIONS}
|
if [[ ${build_os_type} != "win32" ]]; then
|
||||||
sudo make install
|
cd ${library_path}
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
[[ -z "${datapipes_webrtc}" ]] && datapipes_webrtc=1
|
||||||
|
[[ "${datapipes_webrtc}" -eq 1 ]] && _datapipes_webrtc="ON" || datapipes_webrtc="OFF"
|
||||||
|
|
||||||
|
_cxx_options=""
|
||||||
|
[[ ${build_os_type} != "win32" ]] && _cxx_options="-fPIC -static-libgcc -static-libstdc++"
|
||||||
|
[[ ${build_os_type} == "win32" ]] && _cxx_options="-DWIN32"
|
||||||
|
cmake_build ${library_path} -DCrypto_ROOT_DIR="../../boringssl/" -DCRYPTO_TYPE="boringssl" -DCMAKE_CXX_FLAGS="-fPIC -static-libgcc -static-libstdc++ ${CXX_FLAGS}" -DBUILD_TESTS=OFF -DCMAKE_C_FLAGS="${C_FLAGS} -fPIC" -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" ${CMAKE_OPTIONS} -DLIBNICE_PREBUILD_PATH="../libnice/linux_${build_os_arch}" -DGLIBC_PREBUILD_PATH="../glibc/linux_${build_os_arch}" -DBUILD_STATIC=0 -DBUILD_SHARED=1
|
||||||
|
check_err_exit ${library_path} "Failed to build DataPipes!"
|
||||||
|
set_build_successful ${library_path}
|
||||||
|
Loading…
Reference in New Issue
Block a user