docker_build.sh 612 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#!/bin/bash

TARGET=$1

CI_PROJECT_DIR=$(pwd)
CI_BUILD_NAME=${TARGET}

BASE_NAME="moony.lv2"
PKG_CONFIG_PATH="/opt/lv2/lib/pkgconfig:/opt/${CI_BUILD_NAME}/lib/pkgconfig"
TOOLCHAIN_FILE="${CI_PROJECT_DIR}/cmake/${CI_BUILD_NAME}.cmake"

12
rm -rf ${TARGET}
13 14 15 16
mkdir -p ${TARGET}
pushd ${TARGET}
	PKG_CONFIG_PATH=${PKG_CONFIG_PATH} cmake \
		-DCMAKE_BUILD_TYPE=Release \
17
		-DBUILD_TESTING=0 \
18 19 20 21 22 23 24 25
		-DCMAKE_INSTALL_PREFIX=${CI_PROJECT_DIR} \
		-DPLUGIN_DEST="${BASE_NAME}-$(cat ../VERSION)/${CI_BUILD_NAME}/${BASE_NAME}" \
		-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} \
		..
	make -j4
	make install
	#ARGS='-VV' make test
popd