mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-06 11:39:02 -04:00
SDRPlay plugin: use open source libmirisdr interface instead of the Mirics proprietary one
This commit is contained in:
parent
4eb9b59f37
commit
4dd5f70dcd
28
cmake/Modules/FindLibMiriSDR.cmake
Normal file
28
cmake/Modules/FindLibMiriSDR.cmake
Normal file
@ -0,0 +1,28 @@
|
||||
if(NOT LIBMIRISDR_FOUND)
|
||||
|
||||
pkg_check_modules (LIBMIRISDR_PKG libmirisdr)
|
||||
find_path(LIBMIRISDR_INCLUDE_DIR NAMES mirisdr.h
|
||||
PATHS
|
||||
${LIBMIRISDR_PKG_INCLUDE_DIRS}
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
find_library(LIBMIRISDR_LIBRARIES NAMES mirisdr
|
||||
PATHS
|
||||
${LIBMIRISDR_PKG_LIBRARY_DIRS}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
if(LIBMIRISDR_INCLUDE_DIR AND LIBMIRISDR_LIBRARIES)
|
||||
set(LIBMIRISDR_FOUND TRUE CACHE INTERNAL "libmirisdr found")
|
||||
message(STATUS "Found libmirisdr: ${LIBMIRISDR_INCLUDE_DIR}, ${LIBMIRISDR_LIBRARIES}")
|
||||
else(LIBMIRISDR_INCLUDE_DIR AND LIBMIRISDR_LIBRARIES)
|
||||
set(LIBMIRISDR_FOUND FALSE CACHE INTERNAL "libmirisdr found")
|
||||
message(STATUS "libmirisdr not found.")
|
||||
endif(LIBMIRISDR_INCLUDE_DIR AND LIBMIRISDR_LIBRARIES)
|
||||
|
||||
mark_as_advanced(LIBMIRISDR_INCLUDE_DIR LIBMIRISDR_LIBRARIES)
|
||||
|
||||
endif(NOT LIBMIRISDR_FOUND)
|
@ -1,27 +0,0 @@
|
||||
if(NOT LIBSDRPLAY_FOUND)
|
||||
pkg_check_modules (LIBSDRPLAY_PKG libsdrplay)
|
||||
find_path(LIBSDRPLAY_INCLUDE_DIRS NAMES mirsdrapi-rsp.h
|
||||
PATHS
|
||||
${LIBSDRPLAY_PKG_INCLUDE_DIRS}
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
find_library(LIBSDRPLAY_LIBRARIES NAMES mirsdrapi-rsp
|
||||
PATHS
|
||||
${LIBSDRPLAY_PKG_LIBRARY_DIRS}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
if(LIBSDRPLAY_INCLUDE_DIRS AND LIBSDRPLAY_LIBRARIES)
|
||||
set(LIBSDRPLAY_FOUND TRUE CACHE INTERNAL "libsdrplay found")
|
||||
message(STATUS "Found libsdrplay: ${LIBSDRPLAY_INCLUDE_DIRS}, ${LIBSDRPLAY_LIBRARIES}")
|
||||
else(LIBSDRPLAY_INCLUDE_DIRS AND LIBSDRPLAY_LIBRARIES)
|
||||
set(LIBSDRPLAY_FOUND FALSE CACHE INTERNAL "libsdrplay found")
|
||||
message(STATUS "libsdrplay not found.")
|
||||
endif(LIBSDRPLAY_INCLUDE_DIRS AND LIBSDRPLAY_LIBRARIES)
|
||||
|
||||
mark_as_advanced(LIBSDRPLAY_LIBRARIES LIBSDRPLAY_INCLUDE_DIRS)
|
||||
|
||||
endif(NOT LIBSDRPLAY_FOUND)
|
@ -42,13 +42,13 @@ if(LIBUSB_FOUND AND LIBHACKRF_FOUND)
|
||||
add_subdirectory(hackrf)
|
||||
endif(LIBUSB_FOUND AND LIBHACKRF_FOUND)
|
||||
|
||||
find_package(LibSDRPlay)
|
||||
if(LIBUSB_FOUND AND LIBSDRPLAY_FOUND)
|
||||
find_package(LibMiriSDR)
|
||||
if(LIBUSB_FOUND AND LIBMIRISDR_FOUND)
|
||||
add_subdirectory(sdrplay)
|
||||
message(STATUS "LibSDRPlay found")
|
||||
else(LIBUSB_FOUND AND LIBSDRPLAY_FOUND)
|
||||
message(STATUS "LibSDRPlay NOT found")
|
||||
endif(LIBUSB_FOUND AND LIBSDRPLAY_FOUND)
|
||||
message(STATUS "LibMiriSDR found")
|
||||
else(LIBUSB_FOUND AND LIBMIRISDR_FOUND)
|
||||
message(STATUS "LibMiriSDR NOT found")
|
||||
endif(LIBUSB_FOUND AND LIBMIRISDR_FOUND)
|
||||
|
||||
#find_package(LibNANOMSG)
|
||||
#if(LIBNANOMSG_FOUND)
|
||||
|
@ -24,13 +24,13 @@ if (BUILD_DEBIAN)
|
||||
include_directories(
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${LIBSDRPLAYSRC}
|
||||
${LIBMIRISDR_INCLUDE_DIR}
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
include_directories(
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${LIBSDRPLAY_INCLUDE_DIRS}
|
||||
${LIBMIRISDR_INCLUDE_DIR}
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
@ -48,13 +48,13 @@ add_library(inputsdrplay SHARED
|
||||
if (BUILD_DEBIAN)
|
||||
target_link_libraries(inputsdrplay
|
||||
${QT_LIBRARIES}
|
||||
sdrplay
|
||||
mirisdr
|
||||
sdrbase
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_link_libraries(inputsdrplay
|
||||
${QT_LIBRARIES}
|
||||
${LIBSDRPLAY_LIBRARIES}
|
||||
${LIBMIRISDR_LIBRARIES}
|
||||
sdrbase
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
@ -18,10 +18,9 @@ QMAKE_CXXFLAGS += -msse4.1
|
||||
|
||||
CONFIG(MINGW32):INCLUDEPATH += "D:\libusb-1.0.19\include"
|
||||
CONFIG(MINGW64):INCLUDEPATH += "D:\libusb-1.0.19\include"
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
INCLUDEPATH += ../../../sdrbase
|
||||
INCLUDEPATH += ../../../libsdrplay
|
||||
INCLUDEPATH += $$LIBMIRISDRSRC/include
|
||||
|
||||
CONFIG(Release):build_subdir = release
|
||||
CONFIG(Debug):build_subdir = debug
|
||||
@ -41,11 +40,6 @@ HEADERS += sdrplaygui.h\
|
||||
FORMS += sdrplaygui.ui
|
||||
|
||||
LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase
|
||||
|
||||
CONFIG(MINGW32):LIBS += -L$$PWD/../../../libsdrplay/x86 -lmir_sdr_api
|
||||
CONFIG(MINGW64):LIBS += -L$$PWD/../../../libsdrplay/x64 -lmir_sdr_api
|
||||
|
||||
CONFIG(MINGW32):LIBS += -LD:\libusb-1.0.19\MinGW32\dll -llibusb-1.0
|
||||
CONFIG(MINGW64):LIBS += -LD:\libusb-1.0.19\MinGW64\dll -llibusb-1.0
|
||||
LIBS += -L../../../libmirisdr/$${build_subdir} -llibmirisdr
|
||||
|
||||
RESOURCES = ../../../sdrbase/resources/res.qrc
|
||||
|
Loading…
Reference in New Issue
Block a user