Fix bug in searching for gr-iio when CMake is re-run several times (fixes #491)

This commit is contained in:
Carles Fernandez 2021-04-04 11:24:55 +02:00
parent 13a83092da
commit 09b4c8f7a3
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
1 changed files with 4 additions and 0 deletions

View File

@ -2901,6 +2901,10 @@ if(GNURADIO_IIO_FOUND)
set(GR_IIO_INCLUDE_HAS_GNURADIO TRUE)
set(GNURADIO_API_IIO TRUE)
else()
# Force to always search for gr-iio
unset(GRIIO_FOUND CACHE)
unset(IIO_INCLUDE_DIRS CACHE)
unset(IIO_LIBRARIES CACHE)
find_package(GRIIO)
set_package_properties(GRIIO PROPERTIES
PURPOSE "Used for communication with PlutoSDR and FMCOMMS devices."