Added a way to statically build the LV2 in a plugin

This commit is contained in:
Paul Ferrand 2020-01-24 10:37:31 +01:00
parent d91238af4c
commit 8a03a1c5c7
3 changed files with 38 additions and 0 deletions

26
scripts/Dockerfile Normal file
View file

@ -0,0 +1,26 @@
FROM ubuntu:latest
RUN apt-get update && apt-get -y install git g++ curl unzip tar apt-transport-https ca-certificates gnupg software-properties-common wget
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add - \
&& apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' \
&& apt-get update \
&& apt-get install -y cmake
RUN cd /tmp \
&& git clone https://github.com/Microsoft/vcpkg.git \
&& cd vcpkg \
&& ./bootstrap-vcpkg.sh -disableMetrics \
&& ./vcpkg integrate install
COPY x64-linux-hidden.cmake .
RUN ./tmp/vcpkg/vcpkg --overlay-triplets=. install libsndfile:x64-linux-hidden benchmark:x64-linux-hidden
RUN cd /tmp \
&& git clone --branch develop --recursive https://github.com/sfztools/sfizz.git \
&& cd sfizz \
&& mkdir build \
&& cd build \
&& cmake .. -DSFIZZ_JACK=OFF -DSFIZZ_SHARED=OFF "-DCMAKE_TOOLCHAIN_FILE=/tmp/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-linux-hidden -DCMAKE_BUILD_TYPE=Release -DSFIZZ_USE_VCPKG=ON\
&& make -j 16

6
scripts/docker_lv2_release.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
script_dir="$(dirname "$0")"
pushd $script_dir
docker build -t sfizz .
popd
docker cp $(docker create sfizz:latest):/tmp/sfizz/build/sfizz.lv2 .

View file

@ -0,0 +1,6 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -fvisibility=hidden")
set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -fvisibility=hidden")