Quick notes on installing Gazebo classic on MacOS. There are some instructions here for installing from source, however there are only extensive instructions for installing from source for Ubuntu and MacOS users are pointed towards brew formulas. These instructions are based on the brew formula which is linked to.
Install dependencies
brew install cmake pkg-config boost bullet dartsim doxygen ffmpeg freeimage graphviz gts ignition-common3 ignition-fuel-tools4 ignition-math6 ignition-msgs5 ignition-transport8 libtar ogre1.9 protobuf qt@5 qwt-qt5 sdformat9 simbody tbb tinyxml1 tinyxml2 urdfdom zeromqClone the repository
git clone https://github.com/gazebosim/gazebo-classic && cd gazebo-classicNOTES:
- The
-DQt5_DIR=is non-standard but neeeded since I have brew installedqt@5as keg only to prevent issues. - Not entirely sture about the
CMAKE_INSTALL_RPATHsettings, this is provided by brew check wherelibgazebo.11.dylibor similar is installed duringmake install
mkdir build && cd build
cmake .. -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5 \
-DQWT_WIN_INCLUDE_DIR=$(brew --prefix qwt-qt5)/lib/qwt.framework/Headers \
-DQWT_WIN_LIBRARY_DIR=$(brew --prefix qwt-qt5)/lib/qwt.framework \
-DCMAKE_INSTALL_RPATH=/usr/local/libNOTE: For some reason qwt-qt5 installed the library as just qwt without lib prefix or any suffix. If the same happens to you you will need to set the following variables in cmake/SearchForStuff.cmake. Admittedly does not seem to be needed in the brew formula.
###########################
# Add the variables below #
###########################
set(CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES};")
set(CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES};")
###########################
find_library(QWT_LIBRARY NAMES qwt-qt5 qwt PATHS
/usr/local/lib
/usr/local/lib/qwt.framework
${QWT_WIN_LIBRARY_DIR}
)Build!
make -j4
Install
make install