mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-01-24 00:34:44 +01:00
Fixed missing library dir argument for OSX
This commit is contained in:
parent
6aade531a2
commit
8c8acf6955
@ -28,6 +28,7 @@ else (MSVC)
|
|||||||
pkg_check_modules(LIBAIRSPY REQUIRED libairspy)
|
pkg_check_modules(LIBAIRSPY REQUIRED libairspy)
|
||||||
|
|
||||||
target_include_directories(airspy_source PUBLIC ${LIBAIRSPY_INCLUDE_DIRS})
|
target_include_directories(airspy_source PUBLIC ${LIBAIRSPY_INCLUDE_DIRS})
|
||||||
|
target_link_directories(airspyhf_source PUBLIC ${LIBAIRSPY_LIBRARY_DIRS})
|
||||||
target_link_libraries(airspy_source PUBLIC ${LIBAIRSPY_LIBRARIES})
|
target_link_libraries(airspy_source PUBLIC ${LIBAIRSPY_LIBRARIES})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ else (MSVC)
|
|||||||
pkg_check_modules(LIBAIRSPYHF REQUIRED libairspyhf)
|
pkg_check_modules(LIBAIRSPYHF REQUIRED libairspyhf)
|
||||||
|
|
||||||
target_include_directories(airspyhf_source PUBLIC ${LIBAIRSPYHF_INCLUDE_DIRS})
|
target_include_directories(airspyhf_source PUBLIC ${LIBAIRSPYHF_INCLUDE_DIRS})
|
||||||
|
target_link_directories(airspyhf_source PUBLIC ${LIBAIRSPYHF_LIBRARY_DIRS})
|
||||||
target_link_libraries(airspyhf_source PUBLIC ${LIBAIRSPYHF_LIBRARIES})
|
target_link_libraries(airspyhf_source PUBLIC ${LIBAIRSPYHF_LIBRARIES})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ else (MSVC)
|
|||||||
pkg_check_modules(RTAUDIO REQUIRED rtaudio)
|
pkg_check_modules(RTAUDIO REQUIRED rtaudio)
|
||||||
|
|
||||||
target_include_directories(audio_sink PUBLIC ${RTAUDIO_INCLUDE_DIRS})
|
target_include_directories(audio_sink PUBLIC ${RTAUDIO_INCLUDE_DIRS})
|
||||||
|
target_link_directories(audio_sink PUBLIC ${RTAUDIO_LIBRARY_DIRS})
|
||||||
target_link_libraries(audio_sink PUBLIC ${RTAUDIO_LIBRARIES})
|
target_link_libraries(audio_sink PUBLIC ${RTAUDIO_LIBRARIES})
|
||||||
|
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -64,6 +64,13 @@ else()
|
|||||||
${VOLK_INCLUDE_DIRS}
|
${VOLK_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_link_directories(sdrpp_core PUBLIC
|
||||||
|
${GLEW_LIBRARY_DIRS}
|
||||||
|
${FFTW3_LIBRARY_DIRS}
|
||||||
|
${GLFW3_LIBRARY_DIRS}
|
||||||
|
${VOLK_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries(sdrpp_core PUBLIC
|
target_link_libraries(sdrpp_core PUBLIC
|
||||||
${OPENGL_LIBRARIES}
|
${OPENGL_LIBRARIES}
|
||||||
${GLEW_LIBRARIES}
|
${GLEW_LIBRARIES}
|
||||||
|
2
core/src/utils/networking.cpp
Normal file
2
core/src/utils/networking.cpp
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#include <utils/networking.h>
|
||||||
|
|
66
core/src/utils/networking.h
Normal file
66
core/src/utils/networking.h
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <thread>
|
||||||
|
#include <chrono>
|
||||||
|
#include <mutex>
|
||||||
|
|
||||||
|
struct TCPAsyncRead {
|
||||||
|
int timeout;
|
||||||
|
int count;
|
||||||
|
void (*handler)(int count, char* data, void* ctx);
|
||||||
|
void* ctx;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct TCPAsyncWrite {
|
||||||
|
int timeoutMs;
|
||||||
|
int count;
|
||||||
|
char* data;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
NET_ERR_OK = 0,
|
||||||
|
NET_ERR_TIMEOUT = -1,
|
||||||
|
NET_ERR_SYSTEM = -2
|
||||||
|
};
|
||||||
|
|
||||||
|
class TCPClient {
|
||||||
|
public:
|
||||||
|
TCPClient();
|
||||||
|
~TCPClient();
|
||||||
|
|
||||||
|
bool connect(std::string host, int port);
|
||||||
|
bool disconnect();
|
||||||
|
|
||||||
|
int enableAsync();
|
||||||
|
int disableAsync();
|
||||||
|
|
||||||
|
bool isAsync();
|
||||||
|
|
||||||
|
int read(char* data, int count, int timeout = -1);
|
||||||
|
int write(char* data, int count, int timeout = -1);
|
||||||
|
|
||||||
|
int asyncRead(int count, void (*handler)(int count, char* data, void* ctx), int timeout = -1);
|
||||||
|
int asyncWrite(char* data, int count, int timeout = -1);
|
||||||
|
|
||||||
|
bool isOpen();
|
||||||
|
|
||||||
|
int close();
|
||||||
|
|
||||||
|
private:
|
||||||
|
void readWorker();
|
||||||
|
void writeWorker();
|
||||||
|
|
||||||
|
std::mutex readQueueMtx;
|
||||||
|
std::vector<TCPAsyncRead> readQueue;
|
||||||
|
|
||||||
|
std::mutex writeQueueMtx;
|
||||||
|
std::vector<TCPAsyncWrite> writeQueue;
|
||||||
|
|
||||||
|
std::thread readWorkerThread;
|
||||||
|
std::thread writeWorkerThread;
|
||||||
|
|
||||||
|
bool open = false;
|
||||||
|
bool async = false;
|
||||||
|
|
||||||
|
};
|
@ -28,6 +28,7 @@ else (MSVC)
|
|||||||
pkg_check_modules(LIBHACKRF REQUIRED libhackrf)
|
pkg_check_modules(LIBHACKRF REQUIRED libhackrf)
|
||||||
|
|
||||||
target_include_directories(hackrf_source PUBLIC ${LIBHACKRF_INCLUDE_DIRS})
|
target_include_directories(hackrf_source PUBLIC ${LIBHACKRF_INCLUDE_DIRS})
|
||||||
|
target_link_directories(hackrf_source PUBLIC ${LIBHACKRF_LIBRARY_DIRS})
|
||||||
target_link_libraries(hackrf_source PUBLIC ${LIBHACKRF_LIBRARIES})
|
target_link_libraries(hackrf_source PUBLIC ${LIBHACKRF_LIBRARIES})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -31,9 +31,11 @@ else (MSVC)
|
|||||||
pkg_check_modules(LIBAD9361 REQUIRED libad9361)
|
pkg_check_modules(LIBAD9361 REQUIRED libad9361)
|
||||||
|
|
||||||
target_include_directories(plutosdr_source PUBLIC ${LIBIIO_INCLUDE_DIRS})
|
target_include_directories(plutosdr_source PUBLIC ${LIBIIO_INCLUDE_DIRS})
|
||||||
|
target_link_directories(plutosdr_source PUBLIC ${LIBIIO_LIBRARY_DIRS})
|
||||||
target_link_libraries(plutosdr_source PUBLIC ${LIBIIO_LIBRARIES})
|
target_link_libraries(plutosdr_source PUBLIC ${LIBIIO_LIBRARIES})
|
||||||
|
|
||||||
target_include_directories(plutosdr_source PUBLIC ${LIBAD9361_INCLUDE_DIRS})
|
target_include_directories(plutosdr_source PUBLIC ${LIBAD9361_INCLUDE_DIRS})
|
||||||
|
target_link_directories(plutosdr_source PUBLIC ${LIBAD9361_LIBRARY_DIRS})
|
||||||
target_link_libraries(plutosdr_source PUBLIC ${LIBAD9361_LIBRARIES})
|
target_link_libraries(plutosdr_source PUBLIC ${LIBAD9361_LIBRARIES})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ else (MSVC)
|
|||||||
pkg_check_modules(LIBRTLSDR REQUIRED librtlsdr)
|
pkg_check_modules(LIBRTLSDR REQUIRED librtlsdr)
|
||||||
|
|
||||||
target_include_directories(rtl_sdr_source PUBLIC ${LIBRTLSDR_INCLUDE_DIRS})
|
target_include_directories(rtl_sdr_source PUBLIC ${LIBRTLSDR_INCLUDE_DIRS})
|
||||||
|
target_link_directories(rtl_sdr_source PUBLIC ${LIBRTLSDR_LIBRARY_DIRS})
|
||||||
target_link_libraries(rtl_sdr_source PUBLIC ${LIBRTLSDR_LIBRARIES})
|
target_link_libraries(rtl_sdr_source PUBLIC ${LIBRTLSDR_LIBRARIES})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ else (MSVC)
|
|||||||
pkg_check_modules(SOAPY REQUIRED SoapySDR)
|
pkg_check_modules(SOAPY REQUIRED SoapySDR)
|
||||||
|
|
||||||
target_include_directories(soapy_source PUBLIC ${SOAPY_INCLUDE_DIRS})
|
target_include_directories(soapy_source PUBLIC ${SOAPY_INCLUDE_DIRS})
|
||||||
|
target_link_directories(soapy_source PUBLIC ${SOAPY_LIBRARY_DIRS})
|
||||||
target_link_libraries(soapy_source PUBLIC ${SOAPY_LIBRARIES})
|
target_link_libraries(soapy_source PUBLIC ${SOAPY_LIBRARIES})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user