#!/bin/bash

set -x
set -e

# git clone https://github.com/Haivision/srt.git
cd srt

# rename libs to have -nimble suffix
sed -i -r 's/set\(NAME_haisrt \"haisrt\"/set\(NAME_haisrt \"haisrt-nimble\"/g' CMakeLists.txt
sed -i -r 's/set\(NAME_haicrypt \"haicrypt\"/set\(NAME_haicrypt \"haicrypt-nimble\"/g' CMakeLists.txt

./configure --ENABLE_DYNAMIC:BOOL=1 --ENABLE_DEBUG:BOOL=1 --ENABLE_CXX11:BOOL=FALSE
make -j 4

cd ..
