f4exb / sdrangel

SDR Rx/Tx software for Airspy, Airspy HF+, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay and FunCube
GNU General Public License v3.0
2.87k stars 434 forks source link

Soapy module doesn't build #2128

Closed Peter3579 closed 2 months ago

Peter3579 commented 4 months ago

I think the code to detect the soapy library is broken. However, I'm not a cmake specialist. The following change fixed it for me:

diff --git a/cmake/Modules/FindSoapySDR.cmake b/cmake/Modules/FindSoapySDR.cmake
index d52c3432e..babac4659 100644
--- a/cmake/Modules/FindSoapySDR.cmake
+++ b/cmake/Modules/FindSoapySDR.cmake
@@ -11,7 +11,7 @@ if(NOT SOAPYSDR_FOUND)

   pkg_search_module (LIBSOAPYSDR_PKG soapysdr>=0.4.0 SoapySDR>=0.4.0)

-  if(NOT LIBSOAPYSDR_PKG_FOUND OR (DEFINED SOAPYSDR_DIR))
+  if(LIBSOAPYSDR_PKG_FOUND OR (DEFINED SOAPYSDR_DIR))

     find_path (SOAPYSDR_INCLUDE_DIR
       NAMES SoapySDR/Version.h
@@ -47,6 +47,6 @@ if(NOT SOAPYSDR_FOUND)

     mark_as_advanced(SOAPYSDR_INCLUDE_DIR SOAPYSDR_LIBRARY SOAPYSDR_ROOT SOAPYSDR_ABI_VERSION)

-  endif(NOT LIBSOAPYSDR_PKG_FOUND OR (DEFINED SOAPYSDR_DIR))
+  endif(LIBSOAPYSDR_PKG_FOUND OR (DEFINED SOAPYSDR_DIR))

 endif(NOT SOAPYSDR_FOUND)
Peter3579 commented 2 months ago

With the lastest updates to the cmake build files the issue disappeared. The build process works as expected.