hyperion.ng/bin/create_all_releases.sh
redPanther b293ea20db build script optimization (#642)
* implement make install
set CMAKE_INSTALL_PREFIX e.g. to /opt to install to /opt/hyperion
set ENABLE_SYSTEM_INSTALL to ON to activate installation
after compiling use
make install
or
make install/strip
(for performance/size optimized binaries - compile in Release to get best performance)

* cleanup cmake files
use
cmake -DINSTALL_PREFIX=/opt/hyperion ..
to install all files to hyperion or
cmake -DINSTALL_PREFIX=/usr/
to install to usr. install folders are linux standard. bin go to bin folder and additionals (effects) go to share/hyperion

* add uninstall target - be patient with that, this will remove files from your system
install service files to share/hyperion - if you want to use them you have to make a symlink to your location of service files

* optimize build release script
install service files into hyperion share folder (services not activated, this must be done by distribution package script)
initial support of cmake option -DPLATFORM= option. This selects platform specific cmake flags. no need for -DENABLE_... options (unless you want some special things)
automatic detect for apple build

* update submodule


Former-commit-id: 5f06f314841810c780c871f810158010d3d2de70
2016-05-22 00:27:06 +02:00

32 lines
920 B
Bash

#!/bin/sh
# make_release <release name> <platform> [<cmake args ...>]
make_release()
{
echo
echo "--- build release for $1 ---"
echo
RELEASE=$1
PLATFORM=$2
shift 2
mkdir -p build-${RELEASE}
cd build-${RELEASE}
cmake -DPLATFORM=${PLATFORM} $@ -DCMAKE_BUILD_TYPE=Release -Wno-dev .. || exit 1
make -j $(nproc) || exit 1
strip bin/*
cd ..
bin/create_release.sh . ${RELEASE}
}
export PATH="$PATH:$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
CMAKE_PROTOC_FLAG="-DIMPORT_PROTOC=../build-x86x64/protoc_export.cmake"
make_release x86x64 x86
#make_release x32 x86 ${CMAKE_PROTOC_FLAG}
make_release rpi rpi -DCMAKE_TOOLCHAIN_FILE="../Toolchain-rpi.cmake" ${CMAKE_PROTOC_FLAG}
make_release wetek rpi -DCMAKE_TOOLCHAIN_FILE="../Toolchain-rpi.cmake" ${CMAKE_PROTOC_FLAG}
#make_release imx6 imx6 -DCMAKE_TOOLCHAIN_FILE="../Toolchain-imx6.cmake" ${CMAKE_PROTOC_FLAG}