libiio 1.0 is new and not yet packaged by distributions, so keep the
0.x API as the default and add ENABLE_LIBIIO_V1 (default OFF) to build
against 1.x explicitly.
The finder used to look for the 1.x header in IIO_DIR and in the system
paths before falling back to 0.x, independently of where it found the
library. With 1.x installed system-wide and IIO_DIR pointing at 0.26,
it combined 1.x headers with the 0.26 library and the link failed. Now
each candidate install (IIO_DIR, then the one pkg-config reports, then
the system paths) must provide both the header and the library for the
requested API; an install with the other API is skipped with a message.
Changing ENABLE_LIBIIO_V1 triggers detection again in an existing build
directory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
libiio 1.x installs its header as include/iio/iio.h instead of
include/iio.h. Look for the 1.x layout first and fall back to the 0.x
one, and set LIBIIO_V1 so plutosdrdevice can select the API at compile
time. The bundled external build (v0.26) keeps the 0.x path.
The input and output plugin headers only need the iio_buffer type, so
forward-declare it instead of including iio.h.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a terminating LF to tracked text files that were missing a
newline at end of file. This avoids Codacy whitespace failures and
ensures text files conform to the repository line-ending policy.
Affected files were identified and fixed with the following script.
It checks all tracked files against .gitattributes, skips files marked
as binary or -text, and reports the final 32 bytes of any non-empty text
file that does not end with LF before adding the missing newline.
git ls-files -z |
while IFS= read -r -d '' f; do
attr=$(git check-attr text -- "$f")
case "$attr" in
"$f: text: unset"|"$f: text: unspecified")
continue
;;
esac
[ -f "$f" ] || continue
[ -s "$f" ] || continue
[ "$(tail -c 1 -- "$f" | od -An -t x1 | tr -d ' \n')" = "0a" ] || {
printf '%s\n' "$f"
tail -c 32 -- "$f" | hexdump -C
printf '\n' >> "$f"
}
done
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Add an ENABLE_LTO option to make link-time optimization configurable on
while keeping it enabled by default.
This allows builds that require LTO to be disabled (add -DENABLE_LTO=OFF),
including builds for Coverity static analysis, without changing the default
optimization settings.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Add a CMake cppcheck module that provides a new "make cppcheck" target
for running cppcheck against the project and generating a html report.
Use compile_commands.json for analysis, ensure generated Qt sources exist
before analysis, support project suppressions and parallel execution, and
generate an HTML report when cppcheck-htmlreport is available.
Cppcheck remains optional and is only required when BUILD_CPPCHECK is
enabled.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Modernize deprecated CMake usage and correct package-name mismatches
reported by newer CMake versions. Replace exec_program() with
execute_process(), use PkgConfig through find_package() while retaining
fallback discovery, and align find_package_handle_standard_args() names
with their corresponding find_package() calls.
This removes most CMake developer warnings without changing the intended
dependency discovery behavior.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Use pkg-config to verify that codec2 >= 1.1.1 is available before
searching for the headers and library.
If CODEC2_DIR is specified, treat it as an explicit user override and
search that installation directly. Otherwise, use pkg-config to validate
the minimum supported version. If pkg-config is unavailable or an older
codec2 version is installed, disable codec2 support while allowing the
rest of the project to configure normally.
Also update the pkg-config search hints to use the documented
PC_CODEC2_INCLUDE_DIRS and PC_CODEC2_LIBRARY_DIRS variables.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
libcm256cc does not expose its package version through its headers or
shared library, making it impossible to verify a minimum supported
version after discovery leading to errors when building.
When CM256CC_DIR is not specified, use pkg-config to verify that
libcm256cc >= 1.1.2 is available before searching for the headers and
library. If the required version is not found, disable CM256 support
and continue configuring the rest of the project.
When CM256CC_DIR is provided, treat it as an explicit user override and
search that installation directly and blindly (don't check version).
Also update the pkg-config hint variables to use the documented
*_INCLUDE_DIRS and *_LIBRARY_DIRS outputs from pkg_check_modules().
https://cmake.org/cmake/help/latest/module/FindPkgConfig.html
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Add memory buffer to Logger, so last 500 log messages can be included in crash report.
Generate and include stripped pdb files so stack trace can include function names.
Add support for public list of SDRangel servers that can be displayed on Map.
Add FLAC and zlib IQ compression.
Add IQ squelch for compression.
Add remote device/antenna position and direction reporting.
Add text messaging.