I want to include bluez latest version (5.44) to my C program project. I am using CMake for build purpose. I tried using pkg_check_modules
as below
pkg_check_modules (BLUEZ REQUIRED bluez)
include_directories(${BLUEZ_INCLUDE_DIRS})
link_directories(${BLUEZ_LIBRARY_DIRS})
But It always finds the older version 5.37. How can I point this to take latest version ?
I already tried this as well but it throws the error as below.
pkg_check_modules (BLUEZ REQUIRED bluez=5.44)
include_directories(${BLUEZ_INCLUDE_DIRS})
link_directories(${BLUEZ_LIBRARY_DIRS})
Error getting :
Checking for module 'bluez=5.44'
--
CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:367 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)
CMakeLists.txt:30 (pkg_check_modules)
I downloaded the latest bluez version and built and installed using sudo make install
. I am able to find and use the bluetoothctl
tool.