CMake installation¶
This section explains how to compile eProsima Fast DDS Spy with CMake, either locally or globally.
Local installation¶
Create a
Fast-DDS-Spy
directory where to download and build Fast DDS Spy and its dependencies:mkdir -p ~/fastdds-spy/src mkdir -p ~/fastdds-spy/build cd ~/fastdds-spy wget https://raw.githubusercontent.com/eProsima/Fast-DDS-Spy/main/fastddsspy.repos vcs import src < fastddsspy.repos
Compile all dependencies using CMake.
-
cd ~/fastdds-spy mkdir build/foonathan_memory_vendor cd build/foonathan_memory_vendor cmake ~/fastdds-spy/src/foonathan_memory_vendor -DCMAKE_INSTALL_PREFIX=~/fastdds-spy/install -DBUILD_SHARED_LIBS=ON cmake --build . --target install
-
cd ~/fastdds-spy mkdir build/fastcdr cd build/fastcdr cmake ~/fastdds-spy/src/fastcdr -DCMAKE_INSTALL_PREFIX=~/fastdds-spy/install cmake --build . --target install
-
cd ~/fastdds-spy mkdir build/fastdds cd build/fastdds cmake ~/fastdds-spy/src/fastdds -DCMAKE_INSTALL_PREFIX=~/fastdds-spy/install -DCMAKE_PREFIX_PATH=~/fastdds-spy/install cmake --build . --target install
-
# CMake Utils cd ~/fastdds-spy mkdir build/cmake_utils cd build/cmake_utils cmake ~/fastdds-spy/src/dev-utils/cmake_utils -DCMAKE_INSTALL_PREFIX=~/fastdds-spy/install -DCMAKE_PREFIX_PATH=~/fastdds-spy/install cmake --build . --target install # C++ Utils cd ~/fastdds-spy mkdir build/cpp_utils cd build/cpp_utils cmake ~/fastdds-spy/src/dev-utils/cpp_utils -DCMAKE_INSTALL_PREFIX=~/fastdds-spy/install -DCMAKE_PREFIX_PATH=~/fastdds-spy/install cmake --build . --target install
-
# ddspipe_core cd ~/fastdds-spy mkdir build/ddspipe_core cd build/ddspipe_core cmake ~/fastdds-spy/ddspipe_core -DCMAKE_INSTALL_PREFIX=~/fastdds-spy/install -DCMAKE_PREFIX_PATH=~/fastdds-spy/install cmake --build . --target install # ddspipe_yaml cd ~/fastdds-spy mkdir build/ddspipe_yaml cd build/ddspipe_yaml cmake ~/fastdds-spy/ddspipe_yaml -DCMAKE_INSTALL_PREFIX=~/fastdds-spy/install -DCMAKE_PREFIX_PATH=~/fastdds-spy/install cmake --build . --target install # ddspipe_participants cd ~/fastdds-spy mkdir build/ddspipe_participants cd build/ddspipe_participants cmake ~/fastdds-spy/ddspipe_participants -DCMAKE_INSTALL_PREFIX=~/fastdds-spy/install -DCMAKE_PREFIX_PATH=~/fastdds-spy/install cmake --build . --target install
-
Once all dependencies are installed, install eProsima Fast DDS Spy:
# fastddsspy_participants cd ~/fastdds-spy mkdir build/fastddsspy_participants cd build/fastddsspy_participants cmake ~/fastdds-spy/src/fastddsspy_participants -DCMAKE_INSTALL_PREFIX=~/fastdds-spy/install -DCMAKE_PREFIX_PATH=~/fastdds-spy/install cmake --build . --target install # fastddsspy_yaml cd ~/fastdds-spy mkdir build/fastddsspy_yaml cd build/fastddsspy_yaml cmake ~/fastdds-spy/src/fastddsspy_yaml -DCMAKE_INSTALL_PREFIX=~/fastdds-spy/install -DCMAKE_PREFIX_PATH=~/fastdds-spy/install cmake --build . --target install # fastddsspy_tool cd ~/fastdds-spy mkdir build/fastddsspy_tool cd build/fastddsspy_tool cmake ~/fastdds-spy/src/fastddsspy_tool -DCMAKE_INSTALL_PREFIX=~/fastdds-spy/install -DCMAKE_PREFIX_PATH=~/fastdds-spy/install cmake --build . --target install
Note
By default, eProsima Fast DDS Spy does not compile tests.
However, they can be activated by downloading and installing Gtest
and building with CMake option -DBUILD_TESTS=ON
.
Global installation¶
To install eProsima Fast DDS Spy system-wide instead of locally, remove all the flags that appear in the configuration steps of Fast-CDR
, Fast-DDS
, Dev-Utils
, DDS-Pipe
, and fastdds-spy
, and change the first in the configuration step of foonathan_memory_vendor
to the following:
-DCMAKE_INSTALL_PREFIX=/usr/local/ -DBUILD_SHARED_LIBS=ON