android fixes

This commit is contained in:
AlexandreRouma
2022-09-02 20:08:16 +02:00
parent ce3fea3747
commit 72b895fc67
10 changed files with 22 additions and 32 deletions

View File

@ -24,13 +24,12 @@ if (MSVC)
target_link_libraries(hackrf_source PRIVATE hackrf)
elseif (ANDROID)
target_include_directories(hackrf_source PUBLIC
/mnt/android_sdr/libusb/libusb
/mnt/android_sdr/hackrf/host/libhackrf/src
/sdr-kit/${ANDROID_ABI}/include/libhackrf
)
target_link_libraries(hackrf_source PUBLIC
/mnt/android_sdr/output/libusb/${ANDROID_ABI}/libusb1.0.so
/mnt/android_sdr/output/libhackrf/${ANDROID_ABI}/libhackrf.so
/sdr-kit/${ANDROID_ABI}/lib/libusb1.0.so
/sdr-kit/${ANDROID_ABI}/lib/libhackrf.so
)
else (MSVC)
find_package(PkgConfig)

View File

@ -248,7 +248,7 @@ private:
#ifndef __ANDROID__
hackrf_error err = (hackrf_error)hackrf_open_by_serial(_this->selectedSerial.c_str(), &_this->openDev);
#else
hackrf_error err = (hackrf_error)hackrf_open_by_fd(&_this->openDev, _this->devFd);
hackrf_error err = (hackrf_error)hackrf_open_by_fd(_this->devFd, &_this->openDev);
#endif
if (err != HACKRF_SUCCESS) {
spdlog::error("Could not open HackRF {0}: {1}", _this->selectedSerial, hackrf_error_name(err));