From d4e2a03cb15de466703419975043f71dd8dcc179 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Fri, 28 Jun 2024 14:09:33 -0700 Subject: [PATCH] update examples_RPi/CMakeLists.txt --- examples_RPi/CMakeLists.txt | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/examples_RPi/CMakeLists.txt b/examples_RPi/CMakeLists.txt index 15973108..7fa11a16 100644 --- a/examples_RPi/CMakeLists.txt +++ b/examples_RPi/CMakeLists.txt @@ -43,15 +43,13 @@ elseif("${RF24_DRIVER}" STREQUAL "wiringPi") else() message(FATAL "Lib ${RF24_DRIVER} not found.") endif() -elseif(NOT "${LibPIGPIO}" STREQUAL "LibPIGPIO-NOTFOUND" AND NOT DEFINED RF24_NO_INTERUPT) - if(NOT "${RF24_DRIVER}" STREQUAL "pigpio") - message(STATUS "linking to ${LibPIGPIO} for interrupt support") - else() +elseif("${RF24_DRIVER}" STREQUAL "pigpio") + if(NOT "${LibPIGPIO}" STREQUAL "LibPIGPIO-NOTFOUND") message(STATUS "linking to ${LibPIGPIO}") + list(APPEND linked_libs ${LibPIGPIO}) + else() + message(FATAL "Lib ${RF24_DRIVER} not found.") endif() - list(APPEND linked_libs ${LibPIGPIO}) -else() - message(STATUS "Disabling IRQ pin support") endif() foreach(example ${EXAMPLES_LIST}) @@ -59,8 +57,4 @@ foreach(example ${EXAMPLES_LIST}) add_executable(${example} ${example}.cpp) # link the RF24 lib to the target. target_link_libraries(${example} PUBLIC ${linked_libs}) - # conditionally disable interruot support (a pigpio specific feature) - if("${LibPIGPIO}" STREQUAL "LibPIGPIO-NOTFOUND" OR DEFINED RF24_NO_INTERRUPT) - target_compile_definitions(${example} PUBLIC RF24_NO_INTERRUPT) - endif() endforeach()