From 24bdecac8e44e202d2709c78401cc20e62357dea Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 26 May 2020 19:06:08 +0200 Subject: [PATCH] cmake: use less hardcoded items --- client/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index c01c199d9..28735b9b7 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -30,6 +30,7 @@ set(QT_PACKAGELIST set(Qt5_FOUND ON) foreach(_qt_package IN LISTS QT_PACKAGELIST) find_package(${_qt_package} QUIET ${QT_FIND_PACKAGE_OPTIONS}) + set(Qt5_LIBRARIES ${${_qt_package}_LIBRARIES} ${Qt5_LIBRARIES}) if(NOT ${_qt_package}_FOUND) set(Qt5_FOUND OFF) endif(NOT ${_qt_package}_FOUND) @@ -213,7 +214,7 @@ if (Qt5_FOUND) ${TARGET_SOURCES}) add_definitions("-DHAVE_GUI") - set(ADDITIONAL_LNK Qt5::Core Qt5::Widgets Qt5::Gui ${ADDITIONAL_LNK}) + set(ADDITIONAL_LNK ${Qt5_LIBRARIES} ${ADDITIONAL_LNK}) else (Qt5_FOUND) message("Qt5 library not found, not building gui") set(TARGET_SOURCES @@ -224,7 +225,7 @@ endif (Qt5_FOUND) if (BLUEZ_FOUND) message("Bluez library found, building native Bluetooth support :)") add_definitions("-DHAVE_BLUEZ") - set(ADDITIONAL_LNK bluetooth ${ADDITIONAL_LNK}) + set(ADDITIONAL_LNK ${BLUEZ_LIBRARIES} ${ADDITIONAL_LNK}) endif (BLUEZ_FOUND) if (PYTHON3EMBED_FOUND)