Skip to content

Commit 9ef5db7

Browse files
committed
Strip prefixed v from librtlsdr versions
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.
1 parent 543a69a commit 9ef5db7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/goesrecv/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ if(NOT RTLSDR_FOUND)
2424
message(WARNING "Unable to find librtlsdr")
2525
else()
2626
add_library(rtlsdr_source rtlsdr_source.cc)
27+
# some rtlsdr versions begin with an extraneous 'v', remove it
28+
if(RTLSDR_VERSION MATCHES "^v")
29+
string(SUBSTRING ${RTLSDR_VERSION} 1 -1 RTLSDR_VERSION)
30+
endif()
2731
if((RTLSDR_VERSION VERSION_EQUAL 0.5.4) OR
2832
(RTLSDR_VERSION VERSION_GREATER 0.5.4))
2933
target_compile_definitions(rtlsdr_source PRIVATE RTLSDR_HAS_BIAS_TEE)

0 commit comments

Comments
 (0)