Add SKIPBT support to cmake
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user