Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to add Qt Bluetooth module to CMake?
I am not able to add activate Bluetooth module to add cmake file.
the line in cmakefile
find_package(Qt5 COMPONENTS Widgets Qml Quick Bluetooth REQUIRED)
/usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:26: error: Could not find a package configuration file provided by "Qt5Bluetooth" with any of the following names: Qt5BluetoothConfig.cmake qt5bluetooth-config.cmake Add the installation prefix of "Qt5Bluetooth" to CMAKE_PREFIX_PATH or set "Qt5Bluetooth_DIR" to a directory containing one of the above files. If "Qt5Bluetooth" provides a separate development package or SDK, be sure it has been installed. qt_demo/CMakeLists.txt:20 (find_package)
Maybe a silly question but did you install the
qtconnectivity5-dev(or your distribution equivalent) package ?
:) yes, it was the issue, but It does not make sense to me. I installed Qt with maintenance tool, and I am able to compile code with .pro configuration. Any idea?
Now, there is another problem.
error: QtBluetooth/qtbluetooth-config.h: No such file or directory #include <QtBluetooth/qtbluetooth-config.h> ^
thanks in advance
What version did you install ?
Where are you calling cmake from ?
I have 5.10.1 installed under /opt/Qt/5.10.1
I am calling cmake from Qt creator.
What version of cmake are you using ?
cmake version 3.5.1
There is something wrong with my IDE, when I compile from command line everything works.
SGaist, thank you for your help, for now, I am going to flag this thread as Solved.