Skip to content

Commit 68b438d

Browse files
committed
Build Boost and OpenCV for macOS
1 parent ab557ed commit 68b438d

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

build_deps.sh

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,22 @@ export PKG_CONFIG_PATH=$DEPS_SYSROOT/lib/pkgconfig
2323
function getSource() {
2424
mkdir -p $DOWNLOAD_PATH
2525
cd $DOWNLOAD_PATH
26+
27+
# Dependencies for rviz
2628
# Need -L to download github releases according to https://stackoverflow.com/questions/46060010/download-github-release-with-curl
2729
curl -s -L -o freetype.tar.xz https://download.savannah.gnu.org/releases/freetype/freetype-2.12.1.tar.xz \
2830
-o eigen.tar.bz2 https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.bz2 \
2931
-o tinyxml2.tar.gz https://github.com/leethomason/tinyxml2/archive/refs/tags/9.0.0.tar.gz \
3032
-o bullet3.tar.gz https://github.com/bulletphysics/bullet3/archive/refs/tags/3.24.tar.gz \
3133
-o qtbase.tar.gz https://download.qt.io/archive/qt/5.15/5.15.5/submodules/qtbase-everywhere-opensource-src-5.15.5.tar.xz
3234

35+
# Common dependency OpenCV, Boost
36+
curl -s -L -o opencv.tar.gz https://github.com/opencv/opencv/archive/refs/tags/4.6.0.tar.gz \
37+
-o boost.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.gz
38+
3339
# Dependencies for cartographer
3440
if [ $PLATFORM != "macOS" ]; then
3541
curl -s -L -o abseil-cpp.tar.gz https://github.com/abseil/abseil-cpp/archive/refs/tags/20220623.0.tar.gz \
36-
-o boost.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.gz \
3742
-o gflags.tar.gz https://github.com/gflags/gflags/archive/refs/tags/v2.2.2.tar.gz \
3843
-o cairo.tar.xz https://www.cairographics.org/releases/cairo-1.16.0.tar.xz \
3944
-o pixman.tar.gz https://cairographics.org/releases/pixman-0.40.0.tar.gz \
@@ -336,17 +341,26 @@ function buildPCL() {
336341
buildCMake
337342
}
338343

344+
function buildOpenCV() {
345+
echo "Build OpenCV"
346+
cd $SRC_PATH/opencv-4.6.0
347+
buildCMake -DCMAKE_BUILD_TYPE=Release
348+
}
349+
350+
339351
getSource
340352
extractSource
341353
setupPlatform
342354

343355
case $PLATFORM in
344-
"macOS") # Build dependencies for RVIZ
356+
"macOS") # Build dependencies for RVIZ and OpenCV
345357
buildFreeType2
346358
buildEigen3
347359
buildTinyXML2
348360
buildBullet3
349-
buildQt5;;
361+
buildQt5
362+
buildBoost
363+
buildOpenCV;;
350364

351365
*) # Build dependencies for ROS2 cartographer package
352366
buildHostTools

0 commit comments

Comments
 (0)