Skip to content

Commit

Permalink
Strip prefixed v from librtlsdr versions
Browse files Browse the repository at this point in the history
Some versions of librtlsdr (including ones built directly from source)
have a leading 'v' on their versions as reported by pkg-config. This
causes the version check for bias tees to yield incorrect results,
preventing the use of a bias tee even if the underlying librtlsdr
supports it. Removing the 'v' avoids this.
  • Loading branch information
agrif committed Apr 28, 2022
1 parent 543a69a commit 9ef5db7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/goesrecv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ if(NOT RTLSDR_FOUND)
message(WARNING "Unable to find librtlsdr")
else()
add_library(rtlsdr_source rtlsdr_source.cc)
# some rtlsdr versions begin with an extraneous 'v', remove it
if(RTLSDR_VERSION MATCHES "^v")
string(SUBSTRING ${RTLSDR_VERSION} 1 -1 RTLSDR_VERSION)
endif()
if((RTLSDR_VERSION VERSION_EQUAL 0.5.4) OR
(RTLSDR_VERSION VERSION_GREATER 0.5.4))
target_compile_definitions(rtlsdr_source PRIVATE RTLSDR_HAS_BIAS_TEE)
Expand Down

0 comments on commit 9ef5db7

Please sign in to comment.