From 80b25f11489bc227c60a4667b13c1b07b1cb4a84 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 20 Aug 2023 18:53:51 +0200 Subject: [PATCH] update cmake --- CMakeLists.txt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e354bd..fa95bc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,4 +9,15 @@ target_compile_definitions(SoapyHifiBerrySDR PRIVATE __LINUX_ALSA__) target_compile_options(SoapyHifiBerrySDR PRIVATE -O3 -ggdb ) set_property(TARGET SoapyHifiBerrySDR PROPERTY CXX_STANDARD 17) target_link_libraries(SoapyHifiBerrySDR "${LIBRARIES_FROM_REFERENCES}") -install(TARGETS SoapyHifiBerrySDR DESTINATION /usr/local/lib/arm-linux-gnueabihf/SoapySDR/modules0.8-3/) \ No newline at end of file + +######################################################################## +# build the module +######################################################################## +find_package(SoapySDR CONFIG) + +if (NOT SoapySDR_FOUND) + message(WARNING "SoapySDR development files not found - skipping support") + return() +endif () + +install(TARGETS SoapyHifiBerrySDR DESTINATION ${CMAKE_LIB_DEST})