diff --git a/cmake/FindBlueZ.cmake b/cmake/FindBlueZ.cmake index a450543d..b1d30122 100644 --- a/cmake/FindBlueZ.cmake +++ b/cmake/FindBlueZ.cmake @@ -1,10 +1,12 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +set(BlueZ_FOUND 0) + find_package(PkgConfig QUIET) pkg_check_modules(BLUEZ bluez IMPORTED_TARGET) -if (NOT TARGET PkgConfig::BLUEZ) - set(BLUEZ_FOUND 0) +if(TARGET PkgConfig::BLUEZ) + set(BlueZ_FOUND 1) endif() diff --git a/src/bluetooth/configure.cmake b/src/bluetooth/configure.cmake index 7538ad61..a3ae8735 100644 --- a/src/bluetooth/configure.cmake +++ b/src/bluetooth/configure.cmake @@ -9,7 +9,7 @@ #### Libraries -qt_find_package(BlueZ PROVIDED_TARGETS PkgConfig::BlueZ) +qt_find_package(BlueZ PROVIDED_TARGETS PkgConfig::BLUEZ) #### Tests