SDRPlusPlus/source_modules/rtl_sdr_source/CMakeLists.txt

27 lines
910 B
CMake
Raw Normal View History

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)
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
)
2021-02-13 20:43:29 +01:00
else (MSVC)
find_package(PkgConfig)
pkg_check_modules(LIBRTLSDR REQUIRED librtlsdr)
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 ()