From 45b5bbed7be5c206ea31269c9f5b7a970b031e79 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 9 Jun 2020 00:16:42 +0200 Subject: [PATCH] Add SKIPBT support to cmake --- client/CMakeLists.txt | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 94a8415f9..5ccf73d19 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -38,7 +38,9 @@ foreach(_qt_package IN LISTS QT_PACKAGELIST) endforeach() find_package(PkgConfig) -pkg_search_module(BLUEZ QUIET bluez) +if (NOT SKIPBT EQUAL 1) + pkg_search_module(BLUEZ QUIET bluez) +endif() pkg_search_module(PYTHON3 QUIET python3) pkg_search_module(PYTHON3EMBED QUIET python3-embed) @@ -220,11 +222,12 @@ else (Qt5_FOUND) ${TARGET_SOURCES}) endif (Qt5_FOUND) -if (BLUEZ_FOUND) - message("Bluez library found, building native Bluetooth support :)") - add_definitions("-DHAVE_BLUEZ") - set(ADDITIONAL_LNK ${BLUEZ_LIBRARIES} ${ADDITIONAL_LNK}) -endif (BLUEZ_FOUND) +if (NOT SKIPBT EQUAL 1) + if (BLUEZ_FOUND) + add_definitions("-DHAVE_BLUEZ") + set(ADDITIONAL_LNK ${BLUEZ_LIBRARIES} ${ADDITIONAL_LNK}) + endif (BLUEZ_FOUND) +endif(NOT SKIPBT EQUAL 1) if (PYTHON3EMBED_FOUND) message("Python3-embed library found, building with python3 support :)") @@ -240,6 +243,18 @@ elseif (PYTHON3_FOUND) set(ADDITIONAL_LNKDIRS ${PYTHON3_LIBRARY_DIRS} ${ADDITIONAL_LNKDIRS}) endif (PYTHON3EMBED_FOUND) +message(" ===================================================================)") +if (SKIPBT EQUAL 1) + message("native BT support: skipped") +else (SKIPBT EQUAL 1) + if (BLUEZ_FOUND) + message("native BT support: Bluez found, enabled") + else (BLUEZ_FOUND) + message("native BT support: Bluez not found, disabled") + endif (BLUEZ_FOUND) +endif(SKIPBT EQUAL 1) +message(" ===================================================================)") + add_executable(proxmark3 ${PM3_ROOT}/client/src/proxmark3.c ${TARGET_SOURCES}