2021-04-26 17:03:52 +02:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
2021-02-13 20:43:29 +01:00
|
|
|
project(rtl_sdr_source)
|
|
|
|
|
|
|
|
file(GLOB SRC "src/*.cpp")
|
|
|
|
|
2023-02-14 16:25:05 +01:00
|
|
|
include(${SDRPP_MODULE_CMAKE})
|
2021-10-04 02:34:17 +02:00
|
|
|
|
2021-02-13 20:43:29 +01:00
|
|
|
if (MSVC)
|
|
|
|
# Lib path
|
2021-10-04 03:31:13 +02:00
|
|
|
target_link_directories(rtl_sdr_source PRIVATE "C:/Program Files/PothosSDR/bin/")
|
2021-02-13 20:43:29 +01:00
|
|
|
|
2021-10-04 03:31:13 +02:00
|
|
|
target_link_libraries(rtl_sdr_source PRIVATE rtlsdr)
|
2022-02-13 17:25:23 +01:00
|
|
|
elseif (ANDROID)
|
2022-03-30 17:33:47 +02:00
|
|
|
target_link_libraries(rtl_sdr_source PUBLIC
|
2022-09-02 20:08:16 +02:00
|
|
|
/sdr-kit/${ANDROID_ABI}/lib/libusb1.0.so
|
|
|
|
/sdr-kit/${ANDROID_ABI}/lib/librtlsdr.so
|
2022-02-13 17:25:23 +01:00
|
|
|
)
|
2021-02-13 20:43:29 +01:00
|
|
|
else (MSVC)
|
|
|
|
find_package(PkgConfig)
|
|
|
|
|
|
|
|
pkg_check_modules(LIBRTLSDR REQUIRED librtlsdr)
|
2021-04-29 19:12:54 +02:00
|
|
|
pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
|
2021-02-13 20:43:29 +01:00
|
|
|
|
2021-10-04 03:31:13 +02:00
|
|
|
target_include_directories(rtl_sdr_source PRIVATE ${LIBRTLSDR_INCLUDE_DIRS} ${LIBUSB_INCLUDE_DIRS})
|
|
|
|
target_link_directories(rtl_sdr_source PRIVATE ${LIBRTLSDR_LIBRARY_DIRS} ${LIBUSB_LIBRARY_DIRS})
|
|
|
|
target_link_libraries(rtl_sdr_source PRIVATE ${LIBRTLSDR_LIBRARIES} ${LIBUSB_LIBRARIES})
|
2023-02-14 16:25:05 +01:00
|
|
|
endif ()
|