mirror of
https://github.com/30hours/blah2.git
synced 2024-11-18 12:33:58 +00:00
Platform independent vcpkg #13 and SDRplay API generic
This commit is contained in:
parent
8c30e3c34b
commit
635d1e044f
1 changed files with 18 additions and 11 deletions
29
Dockerfile
29
Dockerfile
|
@ -18,19 +18,26 @@ RUN apt-get update && apt-get install -y software-properties-common \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# install dependencies from vcpkg
|
# install dependencies from vcpkg
|
||||||
RUN git clone https://github.com/microsoft/vcpkg /opt/vcpkg \
|
ENV VCPKG_ROOT=/opt/vcpkg
|
||||||
&& /opt/vcpkg/bootstrap-vcpkg.sh
|
RUN export PATH="/opt/vcpkg:${PATH}" \
|
||||||
ENV PATH="/opt/vcpkg:${PATH}" VCPKG_ROOT=/opt/vcpkg
|
&& git clone https://github.com/microsoft/vcpkg /opt/vcpkg \
|
||||||
RUN cd /blah2/lib && vcpkg integrate install \
|
&& if [ "$(uname -m)" = "aarch64" ]; then export VCPKG_FORCE_SYSTEM_BINARIES=1; fi \
|
||||||
|
&& /opt/vcpkg/bootstrap-vcpkg.sh -disableMetrics \
|
||||||
|
&& cd /blah2/lib && vcpkg integrate install \
|
||||||
&& vcpkg install --clean-after-build
|
&& vcpkg install --clean-after-build
|
||||||
|
|
||||||
# install SDRplay API
|
# install SDRplay API
|
||||||
RUN chmod +x /blah2/lib/sdrplay-3.14.0/SDRplay_RSP_API-Linux-3.14.0.run \
|
RUN export ARCH=$(uname -m) \
|
||||||
&& /blah2/lib/sdrplay-3.14.0/SDRplay_RSP_API-Linux-3.14.0.run --tar -xvf -C /blah2/lib/sdrplay-3.14.0 \
|
&& export MAJVER="3.14" \
|
||||||
&& cp /blah2/lib/sdrplay-3.14.0/x86_64/libsdrplay_api.so.3.14 /usr/local/lib/libsdrplay_api.so \
|
&& export MINVER="0" \
|
||||||
&& cp /blah2/lib/sdrplay-3.14.0/x86_64/libsdrplay_api.so.3.14 /usr/local/lib/libsdrplay_api.so.3.14 \
|
&& export VER=${MAJVER}.${MINVER} \
|
||||||
&& cp /blah2/lib/sdrplay-3.14.0/inc/* /usr/local/include \
|
&& cd /blah2/lib/sdrplay-${VER} \
|
||||||
&& chmod 644 /usr/local/lib/libsdrplay_api.so /usr/local/lib/libsdrplay_api.so.3.14 \
|
&& chmod +x SDRplay_RSP_API-Linux-${VER}.run \
|
||||||
|
&& ./SDRplay_RSP_API-Linux-${MAJVER}.${MINVER}.run --tar -xvf -C /blah2/lib/sdrplay-${VER} \
|
||||||
|
&& cp ${ARCH}/libsdrplay_api.so.${MAJVER} /usr/local/lib/libsdrplay_api.so \
|
||||||
|
&& cp ${ARCH}/libsdrplay_api.so.${MAJVER} /usr/local/lib/libsdrplay_api.so.${MAJVER} \
|
||||||
|
&& cp inc/* /usr/local/include \
|
||||||
|
&& chmod 644 /usr/local/lib/libsdrplay_api.so /usr/local/lib/libsdrplay_api.so.${MAJVER} \
|
||||||
&& ldconfig
|
&& ldconfig
|
||||||
|
|
||||||
# install UHD API
|
# install UHD API
|
||||||
|
@ -48,6 +55,6 @@ ADD src src
|
||||||
ADD test test
|
ADD test test
|
||||||
ADD CMakeLists.txt CMakePresets.json Doxyfile /blah2/
|
ADD CMakeLists.txt CMakePresets.json Doxyfile /blah2/
|
||||||
RUN mkdir -p build && cd build && cmake -S . --preset prod-release \
|
RUN mkdir -p build && cd build && cmake -S . --preset prod-release \
|
||||||
-DCMAKE_PREFIX_PATH=/blah2/lib/vcpkg_installed/x64-linux/share .. \
|
-DCMAKE_PREFIX_PATH=$(echo /blah2/lib/vcpkg_installed/*/share) .. \
|
||||||
&& cd prod-release && make
|
&& cd prod-release && make
|
||||||
RUN chmod +x bin/blah2
|
RUN chmod +x bin/blah2
|
||||||
|
|
Loading…
Reference in a new issue