Last active
April 20, 2020 15:30
-
-
Save jangsoopark/cf96061300552d4820d8a9f24e5dc7e6 to your computer and use it in GitHub Desktop.
Live555
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir install | |
## live555 | |
mkdir install/live555 | |
mkdir install/live555/include | |
mkdir install/live555/include/BasicUsageEnvironment | |
mkdir install/live555/include/UsageEnvironment | |
mkdir install/live555/include/liveMedia | |
mkdir install/live555/include/groupsock | |
wget http://www.live555.com/liveMedia/public/live555-latest.tar.gz | |
tar xzvf live555-latest.tar.gz | |
rm live555-latest.tar.gz | |
pushd live | |
cp ../CMakeLists.txt ./ | |
mkdir build | |
pushd build | |
cmake -D CMAKE_C_COMPILER=aarch64-linux-gnu-gcc \ | |
-D CMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \ | |
-D CMAKE_INSTALL_PREFIX=../../install/live555 \ | |
.. | |
make -j | |
make install | |
popd | |
cp BasicUsageEnvironment/include/*.h* ../install/live555/include/BasicUsageEnvironment | |
cp UsageEnvironment/include/*.h* ../install/live555/include/UsageEnvironment | |
cp liveMedia/include/*.h* ../install/live555/include/liveMedia | |
cp groupsock/include/*.h* ../install/live555/include/groupsock | |
popd | |
## ffmpeg | |
mkdir install/ffmpeg | |
wget https://www.ffmpeg.org/releases/ffmpeg-4.2.2.tar.gz | |
tar xzvf ffmpeg-4.2.2.tar.gz | |
rm xzvf ffmpeg-4.2.2.tar.gz | |
pushd ffmpeg-4.2.2 | |
cp ../build_ffmpeg.sh ./ | |
./build_ffmpeg.sh | |
cp -r ./build/asdf/* ../install/ffmpeg/ | |
popd | |
## opencv | |
mkdir install/ffmpeg | |
mkdir opencv | |
pushd opencv | |
git clone https://github.com/opencv/opencv.git | |
git clone https://github.com/opencv/opencv_contrib.git | |
mkdir build | |
pushd build | |
cp ../../build_opencv.sh ./ | |
./build_opencv.sh | |
cp -r ./build/asdf/* ../../install/opencv/ | |
popd | |
popd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function build_ffmpeg | |
{ | |
echo "Configuration" | |
./configure \ | |
--prefix=$prefix \ | |
--arch=aarch64 \ | |
--target-os=linux \ | |
--enable-neon \ | |
--enable-hwaccels \ | |
--enable-cross-compile \ | |
--disable-asm \ | |
--disable-gpl \ | |
--disable-doc \ | |
--cc=$CC \ | |
--cxx=$CXX \ | |
--strip=$STRIP \ | |
--bindir=$bindir \ | |
--libdir=$libdir \ | |
--shlibdir=$shlibdir | |
echo "Build" | |
make -j | |
make install | |
} | |
prefix=$PWD/build/asdf | |
bindir=$prefix/bin | |
libdir=$prefix/lib | |
shlibdir=$prefix/shlib | |
CC=aarch64-linux-gnu-gcc | |
GXX=aarch64-linux-gnu-g++ | |
STRIP=aarch64-linux-gnu-strip | |
build_ffmpeg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake -D CMAKE_BUILD_TYPE=RELEASE \ | |
-D CMAKE_INSTALL_PREFIX=$PWD/build/asdf \ | |
-D CMAKE_C_COMPILER=aarch64-linux-gnu-gcc \ | |
-D CMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \ | |
-D CMAKE_TOOLCHAIN_FILE=../opencv/platforms/linux/aarch64-gnu.toolchain.cmake \ | |
-D INSTALL_C_EXAMPLES=OFF \ | |
-D INSTALL_TO_MANGLED_PATHS=ON \ | |
-D OPENCV_ENABLE_NONFREE=ON \ | |
-D ENABLE_NEON=ON \ | |
-D WITH_OPENMP=ON \ | |
-D WITH_FFMPEG=OFF \ | |
-D WITH_TBB=ON \ | |
-D WITH_V4L=ON \ | |
-D WITH_QT=OFF \ | |
-D WITH_CUDA=OFF \ | |
-D WITH_OPENGL=OFF \ | |
-D WITH_GSTREAMER=OFF \ | |
-D CMAKE_SHARED_LINKER_FLAGS='-latomic' \ | |
-D ENABLE_PRECOMPILED_HEADERS=ON \ | |
-D INSTALL_CREATE_DISTRIB=OFF \ | |
-D INSTALL_TESTS=OFF \ | |
-D ENABLE_FAST_MATH=ON \ | |
-D WITH_IMAGEIO=ON \ | |
-D BUILD_SHARED_LIBS=ON \ | |
-D BUILD_FAT_JAVA_LIB=OFF \ | |
-D BUILD_NEW_PYTHON_SUPPORT=OFF \ | |
-D INSTALL_PYTHON_EXAMPLES=OFF \ | |
-D BUILD_EXAMPLES=OFF \ | |
../opencv | |
# -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules \ | |
make -j | |
make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.5) | |
project(live555 C CXX) | |
include_directories( | |
BasicUsageEnvironment/include | |
groupsock/include | |
liveMedia/include | |
UsageEnvironment/include | |
) | |
if (NOT MSVC) | |
add_compile_options(-DSOCKLEN_T=socklen_t) | |
add_definitions(-DNO_OPENSSL=1) | |
endif() | |
file(GLOB BASIC_USAGE_ENVIRONMENT_SRCS BasicUsageEnvironment/*.c BasicUsageEnvironment/*.cpp) | |
add_library(BasicUsageEnvironment ${BASIC_USAGE_ENVIRONMENT_SRCS}) | |
file(GLOB GROUPSOCK_SRCS groupsock/*.c groupsock/*.cpp) | |
add_library(groupsock ${GROUPSOCK_SRCS}) | |
file(GLOB LIVEMEDIA_SRCS liveMedia/*.c liveMedia/*.cpp) | |
add_library(liveMedia ${LIVEMEDIA_SRCS}) | |
file(GLOB USAGE_ENVIRONMENT_SRCS UsageEnvironment/*.c UsageEnvironment/*.cpp) | |
add_library(UsageEnvironment ${USAGE_ENVIRONMENT_SRCS}) | |
install(TARGETS groupsock BasicUsageEnvironment liveMedia UsageEnvironment | |
RUNTIME DESTINATION bin | |
LIBRARY DESTINATION lib | |
ARCHIVE DESTINATION lib | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment