[rtlsdr] Fix the 'rtlsdr' package when not running from within a git tree. (#11575)

This commit is contained in:
Billy O'Neal 2020-05-29 16:51:12 -07:00 committed by GitHub
parent cc4f93f434
commit 0fc90d9f15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 2 deletions

View File

@ -1,5 +1,5 @@
Source: rtlsdr
Version: 2020-04-16
Version: 2020-04-16-1
Homepage: https://osmocom.org/projects/rtl-sdr
Description: rtl-sdr is a library that turns your Realtek RTL2832 based DVB dongle into a SDR receiver
Build-Depends: libusb, pthreads (windows)

View File

@ -0,0 +1,15 @@
diff --git a/cmake/modules/Version.cmake b/cmake/modules/Version.cmake
index 2d4e76d..6acffe2 100644
--- a/cmake/modules/Version.cmake
+++ b/cmake/modules/Version.cmake
@@ -39,7 +39,9 @@ if(GIT_FOUND)
OUTPUT_VARIABLE GIT_DESCRIBE OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
-else()
+endif()
+
+if ("${GIT_DESCRIBE}" STREQUAL "")
set(GIT_DESCRIBE "v${MAJOR_VERSION}.${MINOR_VERSION}.x-xxx-xunknown")
endif()

View File

@ -9,7 +9,9 @@ vcpkg_from_github(
REF d794155ba65796a76cd0a436f9709f4601509320
SHA512 21fe10f1dbecca651650f03d1008560930fac439d220c33b4a23acce98d78d8476ff200765eed8cfa6cddde761d45f7ba36c8b5bc3662aa85819172830ea4938
HEAD_REF master
PATCHES Compile-with-msvc.patch
PATCHES
Compile-with-msvc.patch
fix-version.patch
)
file(