Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downstream #2

Open
wants to merge 58 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
7f2ae12
contrib/jenkins.sh: run "make maintainer-clean"
osmith42 Jul 11, 2019
be1d120
lib: fix memory leak in rtlsdr_open()
steve-m Jul 16, 2019
81833a1
lib: disable usbfs zero-copy support by default
steve-m Jul 16, 2019
3c263b7
rtl_eeprom: fix warnings
steve-m Nov 1, 2019
9d05150
Fix building librtlsdr on OpenBSD
brianmwaters Nov 11, 2019
5d0735f
lib: Add GPIO version of the bias tee configuration API
Sep 1, 2019
43b2578
rtl_biast: Add rtl_biast
Sep 1, 2019
bd73737
allow building librtlsdr as CMake subproject
leonsal Nov 12, 2019
b5af355
Fixed issues compiling on Windows with MSVC, CMake and NMake (#61)
leonsal Dec 3, 2019
be2e4f8
set CMake policy CMP0075 if it exists
steve-m Jan 19, 2020
1dff8e0
lib: enable better UHF reception (>862MHz) for FC0013
merbanan Feb 17, 2020
222517b
Improve librtlsdr.pc file
maitbot May 8, 2016
b2ee24e
CMake: support for libusb on GNU/Hurd
maitbot Jul 10, 2016
f2a9a81
rtl_fm/rtl_power: Improve scanning range parsing
maitbot Aug 24, 2017
b281473
Use udev uaccess rules
maitbot Aug 24, 2017
8985b45
rtl_tcp: Add IPv6 support
maitbot Sep 3, 2017
f427883
rtl_tcp: Initialize listensocket
steve-m Feb 26, 2020
849f8ef
Modernize CMake
steve-m Feb 26, 2020
f016af8
Update Debian packaging information
steve-m Feb 26, 2020
3d7cdc5
Add missing rtlsdrConfig.cmake
steve-m Feb 26, 2020
d6ca2b0
Fix for CMake < 3.12.0
steve-m Mar 2, 2020
dc92af0
debian: fix source/format from quilt to native
laf0rge Mar 2, 2020
d794155
tuner_r82xx: fix short-write in r82xx_read
pallas Mar 18, 2020
c1faae2
Add rtl_biast as install target
steve-m Jun 6, 2020
ed0317e
cmake: populate pkgconfig file with prefix
Hoernchen Aug 2, 2020
0847e93
fix windows build
Hoernchen Oct 31, 2020
641c221
rtl_tcp: Extracted some constants out of printf strings
dneiss Aug 17, 2021
3163b88
rtl_tcp: put new DEFAULT_* constants in defines
osmith42 Aug 18, 2021
a4eab76
rtl_fm: add a new option to select 2nd direct sampling mode
LouDou Jul 29, 2021
d770add
Fix minGW build
mnhauke Sep 11, 2021
2659e2d
lib: force wait state after cancel of usb transfer
jvde-github Jan 8, 2022
5e73f90
lib: Stop applying workaround for libusb < 1.0.9
argilo Jan 15, 2022
142325a
Fix signal handler from getting stuck in an endless loop
Nov 18, 2022
1261fbb
add rtl-sdr blog v4 support
rtlsdrblog Aug 21, 2023
6ca9082
fix rtl_tcp on macos
Aug 28, 2023
178267c
fix rtl_tcp error on windows when hints not initialized to 0
rtlsdrblog Aug 31, 2023
138cd05
add blog v4 upconverter gpio switch
rtlsdrblog Sep 20, 2023
6de0987
add -D direct sampling flag to rtl_tcp
Aug 23, 2023
2f28c0f
add direct sampling to rtl_sdr
Aug 24, 2023
42e8207
change version to 2.0.0
steve-m Nov 2, 2023
3818ea7
debian/changelog: update for 2.0.0
osmith42 Nov 3, 2023
632c77b
gitignore: add files created by autotools
osmith42 Nov 2, 2023
420086a
Release 2.0.1
osmith42 Nov 3, 2023
448a655
Fix small typo in rtl_sdr man page
mfalkvidd Nov 14, 2023
c945bd0
Use library paths from pkg-config
argilo Dec 7, 2023
b85f037
Merge pull request 'Use library paths from pkg-config' (#4) from argi…
Dec 7, 2023
af33886
Only use LIBUSB_LINK_LIBRARIES if it exists
argilo Dec 24, 2023
91ef34d
improve CLI usage docs: '-d' also accepts serial
hayguen Oct 11, 2018
f5978e8
r82xx: improve tuner precision
mutability Aug 23, 2014
0b64f07
r82xx: avoid redundant register writes for speed
sultanqasim Feb 18, 2024
2acb75c
r82xx: batch register writes for tuning
sultanqasim Feb 19, 2024
dd2511a
Merge pull request 'Improve CLI usage docs: '-d' also accepts serial'…
Mar 8, 2024
ef23f80
Merge pull request 'r82xx: improved tuning speed and accuracy' (#6) f…
Mar 8, 2024
e04c42c
fix: set fc0012 gain to low on init
eshaz Mar 12, 2023
d81ef9a
fix: round gain input to nearest value
eshaz Mar 12, 2023
ab2434e
Add funding link to github mirror
laf0rge Mar 23, 2024
7ebcb04
lib: set SOVERSION back to 0
steve-m Apr 7, 2024
619ac31
Release 2.0.2
osmith42 Apr 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
open_collective: osmocom
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ config.log
config.status
config.guess
configure
configure~
compile
depcomp
missing
ltmain.sh
Expand Down
134 changes: 90 additions & 44 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,46 +1,49 @@
# Copyright 2012 OSMOCOM Project
# Copyright 2012-2020 Osmocom Project
#
# This file is part of rtl-sdr
#
# GNU Radio is free software; you can redistribute it and/or modify
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
# along with this program. If not, see <http://www.gnu.org/licenses/>.


########################################################################
# Project setup
########################################################################
cmake_minimum_required(VERSION 2.6)
project(rtlsdr C)
cmake_minimum_required(VERSION 3.7.2)

# workaround for https://gitlab.kitware.com/cmake/cmake/issues/16967
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
project(rtlsdr)
else()
project(rtlsdr C)
endif()

#select the release build type by default to get optimization flags
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
message(STATUS "Build type not specified: defaulting to release.")
endif(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")

list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)

if(NOT LIB_INSTALL_DIR)
set(LIB_INSTALL_DIR lib)
endif()
include(GNUInstallDirs)
include(GenerateExportHeader)
include(CMakePackageConfigHelpers)

# Set the version information here
set(VERSION_INFO_MAJOR_VERSION 0) # increment major on api compatibility changes
set(VERSION_INFO_MINOR_VERSION 6) # increment minor on feature-level changes
set(VERSION_INFO_PATCH_VERSION git) # increment patch for bug fixes and docs
set(VERSION_INFO_MAJOR_VERSION 2) # increment major on api compatibility changes
set(VERSION_INFO_MINOR_VERSION 0) # increment minor on feature-level changes
set(VERSION_INFO_PATCH_VERSION 1) # increment patch for bug fixes and docs
include(Version) # setup version info

########################################################################
Expand All @@ -63,40 +66,39 @@ endif()
########################################################################
# Find build dependencies
########################################################################
find_package(Threads)
find_package(PkgConfig)
find_package(LibUSB)
if(WIN32 AND NOT MINGW)
set(THREADS_USE_PTHREADS_WIN32 true)

if(PKG_CONFIG_FOUND)
pkg_check_modules(LIBUSB libusb-1.0 IMPORTED_TARGET)
if(LIBUSB_LINK_LIBRARIES)
set(LIBUSB_LIBRARIES "${LIBUSB_LINK_LIBRARIES}")
endif()
else()
set(LIBUSB_LIBRARIES "" CACHE STRING "manual libusb path")
set(LIBUSB_INCLUDE_DIRS "" CACHE STRING "manual libusb includepath")
endif()

if(MSVC)
set(THREADS_PTHREADS_LIBRARY "" CACHE STRING "manual pthread-win32 path")
set(THREADS_PTHREADS_INCLUDE_DIR "" CACHE STRING "manual pthread-win32 includepath")
else()
set(THREADS_PTHREADS_LIBRARY "" CACHE INTERNAL "manual pthread-win32 path")
set(THREADS_PTHREADS_INCLUDE_DIR "" CACHE INTERNAL "manual pthread-win32 includepath")
endif()
find_package(Threads)

if(NOT LIBUSB_FOUND)
if(PKG_CONFIG_FOUND AND NOT LIBUSB_FOUND)
message(FATAL_ERROR "LibUSB 1.0 required to compile rtl-sdr")
endif()
if(NOT THREADS_FOUND)
message(FATAL_ERROR "pthreads(-win32) required to compile rtl-sdr")
endif()
########################################################################
# Setup the include and linker paths
########################################################################
include_directories(
${CMAKE_SOURCE_DIR}/include
${LIBUSB_INCLUDE_DIR}
${THREADS_PTHREADS_INCLUDE_DIR}
)

#link_directories(
# ...
#)

# Set component parameters
#set(INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "" FORCE)

########################################################################
# Create uninstall target
########################################################################
configure_file(
${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
${PROJECT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
@ONLY)

Expand Down Expand Up @@ -126,16 +128,32 @@ else (DETACH_KERNEL_DRIVER)
message (STATUS "Building with kernel driver detaching disabled, use -DDETACH_KERNEL_DRIVER=ON to enable")
endif (DETACH_KERNEL_DRIVER)

option(ENABLE_ZEROCOPY "Enable usbfs zero-copy support" OFF)
if (ENABLE_ZEROCOPY)
message (STATUS "Building with usbfs zero-copy support enabled")
add_definitions(-DENABLE_ZEROCOPY=1)
else (ENABLE_ZEROCOPY)
message (STATUS "Building with usbfs zero-copy support disabled, use -DENABLE_ZEROCOPY=ON to enable")
endif (ENABLE_ZEROCOPY)

########################################################################
# Install public header files
########################################################################
install(FILES
include/rtl-sdr.h
include/rtl-sdr_export.h
DESTINATION include
)

########################################################################
# Add subdirectories
########################################################################
add_subdirectory(include)
add_subdirectory(src)

########################################################################
# Create Pkg Config File
########################################################################
FOREACH(inc ${LIBUSB_INCLUDE_DIR})
FOREACH(inc ${LIBUSB_INCLUDEDIR})
LIST(APPEND RTLSDR_PC_CFLAGS "-I${inc}")
ENDFOREACH(inc)

Expand All @@ -153,10 +171,10 @@ IF(CMAKE_CROSSCOMPILING)
UNSET(RTLSDR_PC_LIBS)
ENDIF(CMAKE_CROSSCOMPILING)

set(prefix ${CMAKE_INSTALL_PREFIX})
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix \${prefix})
set(libdir \${exec_prefix}/${LIB_INSTALL_DIR})
set(includedir \${prefix}/include)
set(libdir \${exec_prefix}/lib)

CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/librtlsdr.pc.in
Expand All @@ -165,9 +183,37 @@ CONFIGURE_FILE(

INSTALL(
FILES ${CMAKE_CURRENT_BINARY_DIR}/librtlsdr.pc
DESTINATION ${LIB_INSTALL_DIR}/pkgconfig
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)

########################################################################
# Create CMake Config File
########################################################################
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/rtlsdr/rtlsdrConfigVersion.cmake"
VERSION ${VERSION}
COMPATIBILITY AnyNewerVersion
)

configure_file(cmake/rtlsdrConfig.cmake
"${CMAKE_CURRENT_BINARY_DIR}/rtlsdr/rtlsdrConfig.cmake"
COPYONLY
)

set(ConfigPackageLocation lib/cmake/rtlsdr)
install(EXPORT RTLSDR-export
FILE rtlsdrTargets.cmake
NAMESPACE rtlsdr::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/rtlsdr/
)
install(
FILES
cmake/rtlsdrConfig.cmake
"${CMAKE_CURRENT_BINARY_DIR}/rtlsdr/rtlsdrConfigVersion.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/rtlsdr/
COMPONENT Devel
)

########################################################################
# Print Summary
########################################################################
Expand Down
55 changes: 0 additions & 55 deletions cmake/Modules/FindLibUSB.cmake

This file was deleted.

Loading