jammy-deps: build opencv with same soname than system binaries to correctly overshadow them in ros

This commit is contained in:
matlabbe
2026-09-13 00:46:46 -07:00
parent 6075e52857
commit 1fe713cc1f
+3
View File
@@ -68,9 +68,12 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then echo "Installing zed-open-cap
cd && \ cd && \
rm -r zed-open-capture; fi rm -r zed-open-capture; fi
# Ubuntu 22.04 is the only release whose OpenCV carries an ABI suffix in its SONAME:
# libopencv_core.so.4.5d.
RUN git clone --branch 4.5.4 https://github.com/opencv/opencv.git && \ RUN git clone --branch 4.5.4 https://github.com/opencv/opencv.git && \
git clone --branch 4.5.4 https://github.com/opencv/opencv_contrib.git && \ git clone --branch 4.5.4 https://github.com/opencv/opencv_contrib.git && \
cd opencv && \ cd opencv && \
sed -i '/OPENCV_SOVERSION/s/}")/}d")/' cmake/OpenCVVersion.cmake && \
mkdir build && \ mkdir build && \
cd build && \ cd build && \
cmake -DWITH_TBB=ON -DWITH_OPENMP=ON -DBUILD_opencv_python3=OFF -DBUILD_opencv_python_bindings_generator=OFF -DBUILD_opencv_python_tests=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DOPENCV_ENABLE_NONFREE=ON -DOPENCV_EXTRA_MODULES_PATH=/root/opencv_contrib/modules .. && \ cmake -DWITH_TBB=ON -DWITH_OPENMP=ON -DBUILD_opencv_python3=OFF -DBUILD_opencv_python_bindings_generator=OFF -DBUILD_opencv_python_tests=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DOPENCV_ENABLE_NONFREE=ON -DOPENCV_EXTRA_MODULES_PATH=/root/opencv_contrib/modules .. && \