This most probably means that CMake does not find the OpenDDS package files.
CMake reads the CMake variable CMAKE_PREFIX_PATH
and extends its default package search path by this. By default Qt Creator sets that to your Qt install path (which is good since you want to use Qt), but to use OpenDDS you need to point it to its source/install path as well (see the OpenDDS CMake documentation).
You can add multiple paths to CMAKE_PREFIX_PATH
, separated by ;
on Windows, or :
on Linux/macOS.
In Qt Creator the CMAKE_PREFIX_PATH
is set up in the CMake Configuration
part of the Kit. So:
- Open "Options > Kits > Kits" and choose the kit you use for your project
- Scroll down to
CMake Configuration
and click Change
- Find the
CMAKE_PREFIX_PATH
line and change it to something like
CMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX};C:\path\to\OpenDDS
or if you are on Linux/macOS
CMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX};/path/to/OpenDDS
You might need to close and re-open the project after that (but maybe not).