2016-10-25 22:57:46 +00:00
|
|
|
project(rtlsdr)
|
|
|
|
|
2018-11-24 20:21:04 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
|
|
|
2017-01-09 00:00:12 +00:00
|
|
|
add_definitions(-DDETACH_KERNEL_DRIVER=ON)
|
|
|
|
|
2016-10-25 22:57:46 +00:00
|
|
|
find_package(LibUSB)
|
|
|
|
|
|
|
|
set(rtlsdr_SOURCES
|
|
|
|
${LIBRTLSDRSRC}/src/librtlsdr.c
|
2017-11-13 00:54:29 +00:00
|
|
|
${LIBRTLSDRSRC}/src/rtlsdr_rpc_msg.c
|
|
|
|
${LIBRTLSDRSRC}/src/rtlsdr_rpc.c
|
2016-10-25 22:57:46 +00:00
|
|
|
${LIBRTLSDRSRC}/src/tuner_e4k.c
|
|
|
|
${LIBRTLSDRSRC}/src/tuner_fc0012.c
|
|
|
|
${LIBRTLSDRSRC}/src/tuner_fc0013.c
|
|
|
|
${LIBRTLSDRSRC}/src/tuner_fc2580.c
|
|
|
|
${LIBRTLSDRSRC}/src/tuner_r82xx.c
|
|
|
|
${LIBRTLSDRSRC}/src/getopt/getopt.c
|
2017-11-13 00:54:29 +00:00
|
|
|
${LIBRTLSDRSRC}/src/convenience/convenience.c
|
2016-10-25 22:57:46 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(rtlsdr_HEADERS
|
2017-11-13 00:54:29 +00:00
|
|
|
${LIBRTLSDRSRC}/include/reg_field.h
|
2016-10-25 22:57:46 +00:00
|
|
|
${LIBRTLSDRSRC}/include/rtl-sdr_export.h
|
2017-11-13 00:54:29 +00:00
|
|
|
${LIBRTLSDRSRC}/include/rtlsdr_i2c.h
|
|
|
|
${LIBRTLSDRSRC}/include/rtlsdr_rpc_msg.h
|
|
|
|
${LIBRTLSDRSRC}/include/rtlsdr_rpc.h
|
|
|
|
${LIBRTLSDRSRC}/include/rtl-sdr.h
|
|
|
|
${LIBRTLSDRSRC}/include/tuner_e4k.h
|
|
|
|
${LIBRTLSDRSRC}/include/tuner_fc0012.h
|
|
|
|
${LIBRTLSDRSRC}/include/tuner_fc0013.h
|
|
|
|
${LIBRTLSDRSRC}/include/tuner_fc2580.h
|
|
|
|
${LIBRTLSDRSRC}/include/tuner_r82xx.h
|
|
|
|
${LIBRTLSDRSRC}/include/getopt/getopt.h
|
|
|
|
${LIBRTLSDRSRC}/src/convenience/convenience.h
|
2016-10-25 22:57:46 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
.
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${LIBUSB_INCLUDE_DIR}
|
|
|
|
${LIBRTLSDRSRC}/include
|
|
|
|
${LIBRTLSDRSRC}/src
|
|
|
|
)
|
|
|
|
|
|
|
|
add_definitions(-DQT_SHARED)
|
|
|
|
|
|
|
|
add_library(rtlsdr SHARED
|
|
|
|
${rtlsdr_SOURCES}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(rtlsdr
|
|
|
|
${LIBUSB_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
install(TARGETS rtlsdr DESTINATION lib)
|