Skip to content

Commit 50cfd95

Browse files
committed
removed rtl-sdr files and modified CMake and autotools configurations
1 parent 7748f46 commit 50cfd95

37 files changed

+109
-11853
lines changed

.gitignore

+2-4
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ config.log
1717
config.status
1818
config.guess
1919
configure
20+
compile
2021
depcomp
2122
missing
2223
ltmain.sh
2324
install-sh
2425
stamp-h1
2526
libtool
2627
Doxyfile
27-
build
28+
.dirstamp
2829

2930
.tarball-version
3031
.version
@@ -37,9 +38,6 @@ src/rtl_sdr
3738
src/rtl_tcp
3839

3940
CMakeCache.txt
40-
*/CMakeFiles
41-
CMakeFiles
42-
*.cmake
4341

4442
build/
4543
.cproject

AUTHORS

+20-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
Steve Markgraf <[email protected]>
2-
Dimitri Stolnikov <[email protected]>
3-
Hoernchen <[email protected]>
4-
Kyle Keen <[email protected]>
1+
Benjamin Larsson <[email protected]>
2+
Sven Killig <[email protected]>
3+
Benjamin Larsson <[email protected]>
4+
5+
johan <johan@E6410>
6+
Thomas Kerpe <[email protected]>
7+
Jens Jensen <[email protected]>
8+
Sven <sonic@sonic-VGN-Z41WD-B.(none)>
9+
Martin Hauke <[email protected]>
10+
magellannh <pi@raspberrypi.(none)>
11+
jules69350 <[email protected]>
12+
13+
andreaaizza <[email protected]>
14+
Trueffelwurm <[email protected]>
15+
Tomasz Brzezina <[email protected]>
16+
17+
Corné van Strien <[email protected]>
18+
Baruch Even <[email protected]>
19+
20+
Helge Weissig <[email protected]>

CMakeLists.txt

+11-64
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
# Copyright 2012 OSMOCOM Project
2-
#
3-
# This file is part of rtl-sdr
4-
#
5-
# GNU Radio is free software; you can redistribute it and/or modify
6-
# it under the terms of the GNU General Public License as published by
7-
# the Free Software Foundation; either version 3, or (at your option)
8-
# any later version.
9-
#
10-
# GNU Radio is distributed in the hope that it will be useful,
1+
# rtl_433 is distributed in the hope that it will be useful,
112
# but WITHOUT ANY WARRANTY; without even the implied warranty of
123
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
134
# GNU General Public License for more details.
@@ -22,7 +13,9 @@
2213
# Project setup
2314
########################################################################
2415
cmake_minimum_required(VERSION 2.6)
25-
project(rtlsdr C)
16+
project(rtl433 C)
17+
set (rtl433_VERSION_MAJOR 1)
18+
set (rtl433_VERSION_MINOR 0)
2619

2720
#select the release build type by default to get optimization flags
2821
if(NOT CMAKE_BUILD_TYPE)
@@ -50,32 +43,16 @@ endif()
5043
# Find build dependencies
5144
########################################################################
5245
find_package(PkgConfig)
53-
find_package(LibUSB)
54-
set(THREADS_USE_PTHREADS_WIN32 true)
55-
find_package(Threads)
46+
find_package(LibRTLSDR)
5647

57-
if(NOT LIBUSB_FOUND)
58-
message(FATAL_ERROR "LibUSB 1.0 required to compile rtl-sdr")
59-
endif()
60-
if(NOT THREADS_FOUND)
61-
message(FATAL_ERROR "pthreads(-win32) required to compile rtl-sdr")
62-
endif()
6348
########################################################################
6449
# Setup the include and linker paths
6550
########################################################################
6651
include_directories(
6752
${CMAKE_SOURCE_DIR}/include
68-
${LIBUSB_INCLUDE_DIR}
69-
${THREADS_PTHREADS_INCLUDE_DIR}
53+
${LIBRTLSDR_INCLUDE_DIRS}
7054
)
7155

72-
#link_directories(
73-
# ...
74-
#)
75-
76-
# Set component parameters
77-
#set(INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "" FORCE)
78-
7956
########################################################################
8057
# Create uninstall target
8158
########################################################################
@@ -88,58 +65,28 @@ add_custom_target(uninstall
8865
${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
8966
)
9067

91-
########################################################################
92-
# Install udev rules
93-
########################################################################
94-
option(INSTALL_UDEV_RULES "Install udev rules for RTL-SDR" OFF)
95-
if (INSTALL_UDEV_RULES)
96-
install (
97-
FILES rtl-sdr.rules
98-
DESTINATION "/etc/udev/rules.d"
99-
COMPONENT "udev"
100-
)
101-
else (INSTALL_UDEV_RULES)
102-
message (STATUS "Udev rules not being installed, install them with -DINSTALL_UDEV_RULES=ON")
103-
endif (INSTALL_UDEV_RULES)
104-
10568
########################################################################
10669
# Add subdirectories
10770
########################################################################
10871
add_subdirectory(include)
10972
add_subdirectory(src)
11073

111-
########################################################################
112-
# Create Pkg Config File
113-
########################################################################
114-
FOREACH(inc ${LIBUSB_INCLUDE_DIR})
115-
LIST(APPEND RTLSDR_PC_CFLAGS "-I${inc}")
116-
ENDFOREACH(inc)
117-
118-
FOREACH(lib ${LIBUSB_LIBRARY_DIRS})
119-
LIST(APPEND RTLSDR_PC_LIBS "-L${lib}")
120-
ENDFOREACH(lib)
121-
12274
# use space-separation format for the pc file
123-
STRING(REPLACE ";" " " RTLSDR_PC_CFLAGS "${RTLSDR_PC_CFLAGS}")
124-
STRING(REPLACE ";" " " RTLSDR_PC_LIBS "${RTLSDR_PC_LIBS}")
75+
STRING(REPLACE ";" " " RTL433_PC_CFLAGS "${RTL433_PC_CFLAGS}")
76+
STRING(REPLACE ";" " " RTL433_PC_LIBS "${RTL433_PC_LIBS}")
12577

12678
# unset these vars to avoid hard-coded paths to cross environment
12779
IF(CMAKE_CROSSCOMPILING)
128-
UNSET(RTLSDR_PC_CFLAGS)
129-
UNSET(RTLSDR_PC_LIBS)
80+
UNSET(RTL433_PC_CFLAGS)
81+
UNSET(RTL433_PC_LIBS)
13082
ENDIF(CMAKE_CROSSCOMPILING)
13183

13284
set(prefix ${CMAKE_INSTALL_PREFIX})
13385
set(exec_prefix \${prefix})
13486
set(libdir \${exec_prefix}/lib)
13587
set(includedir \${prefix}/include)
13688

137-
CONFIGURE_FILE(
138-
${CMAKE_CURRENT_SOURCE_DIR}/librtlsdr.pc.in
139-
${CMAKE_CURRENT_BINARY_DIR}/librtlsdr.pc
140-
@ONLY)
141-
14289
INSTALL(
143-
FILES ${CMAKE_CURRENT_BINARY_DIR}/librtlsdr.pc
90+
FILES
14491
DESTINATION lib/pkgconfig
14592
)

Doxyfile.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ DOXYFILE_ENCODING = UTF-8
2525
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
2626
# by quotes) that should identify the project.
2727

28-
PROJECT_NAME = librtlsdr
28+
PROJECT_NAME = rtl433
2929

3030
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
3131
# This could be handy for archiving the generated documentation or
@@ -37,7 +37,7 @@ PROJECT_NUMBER = @VERSION@
3737
# for a project that appears at the top of each page and should give viewer
3838
# a quick idea about the purpose of the project. Keep the description short.
3939

40-
PROJECT_BRIEF = "RTL-SDR library"
40+
PROJECT_BRIEF = "RTL-433 utility"
4141

4242
# With the PROJECT_LOGO tag one can specify an logo or icon that is
4343
# included in the documentation. The maximum height of the logo should not

Makefile.am

+1-7
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,14 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include
55
SUBDIRS = include src
66

77
pkgconfigdir = $(libdir)/pkgconfig
8-
pkgconfig_DATA = librtlsdr.pc
8+
pkgconfig_DATA = rtl433.pc
99

1010
BUILT_SOURCES = $(top_srcdir)/.version
1111
$(top_srcdir)/.version:
1212
echo $(VERSION) > $@-t && mv $@-t $@
1313
dist-hook:
1414
echo $(VERSION) > $(distdir)/.tarball-version
1515

16-
install-udev-rules:
17-
$(INSTALL_DATA) rtl-sdr.rules /etc/udev/rules.d
18-
19-
uninstall-udev-rules:
20-
rm -rf /etc/udev/rules.d/rtl-sdr.rules
21-
2216
EXTRA_DIST = git-version-gen
2317

2418
if HAVE_DOXYGEN

cmake/Modules/FindLibRTLSDR.cmake

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
INCLUDE(FindPkgConfig)
2+
if(NOT LIBRTLSDR_FOUND)
3+
pkg_check_modules (LIBRTLSDR_PKG librtlsdr)
4+
find_path(LIBRTLSDR_INCLUDE_DIRS NAMES rtl-sdr.h
5+
PATHS
6+
${LIBRTLSDR_PKG_INCLUDE_DIRS}
7+
/usr/include
8+
/usr/local/include
9+
)
10+
11+
find_library(LIBRTLSDR_LIBRARIES NAMES rtlsdr
12+
PATHS
13+
${LIBRTLSDR_PKG_LIBRARY_DIRS}
14+
/usr/lib
15+
/usr/local/lib
16+
)
17+
18+
if(LIBRTLSDR_INCLUDE_DIRS AND LIBRTLSDR_LIBRARIES)
19+
set(LIBRTLSDR_FOUND TRUE CACHE INTERNAL "librtlsdr found")
20+
message(STATUS "Found librtlsdr: ${LIBRTLSDR_INCLUDE_DIRS}, ${LIBRTLSDR_LIBRARIES}")
21+
else(LIBRTLSDR_INCLUDE_DIRS AND LIBRTLSDR_LIBRARIES)
22+
set(LIBRTLSDR_FOUND FALSE CACHE INTERNAL "librtlsdr found")
23+
message(STATUS "librtlsdr not found.")
24+
endif(LIBRTLSDR_INCLUDE_DIRS AND LIBRTLSDR_LIBRARIES)
25+
26+
mark_as_advanced(LIBRTLSDR_LIBRARIES LIBRTLSDR_INCLUDE_DIRS)
27+
28+
endif(NOT LIBRTLSDR_FOUND)

cmake/Modules/FindLibUSB.cmake

-28
This file was deleted.

0 commit comments

Comments
 (0)