add win32 compatibility

Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
Hoernchen
2012-04-02 20:56:24 +02:00
committed by Steve Markgraf
parent ff50e0beda
commit 229ebd2ff2
7 changed files with 311 additions and 15 deletions

View File

@ -30,10 +30,22 @@ add_library(rtlsdr SHARED
target_link_libraries(rtlsdr
${LIBUSB_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
set_target_properties(rtlsdr PROPERTIES DEFINE_SYMBOL "rtlsdr_EXPORTS")
add_library(rtlsdrs STATIC
rtl-sdr.c
tuner_e4000.c
tuner_fc0012.c
tuner_fc0013.c
)
target_link_libraries(rtlsdrs
${LIBUSB_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
set_target_properties(rtlsdrs PROPERTIES DEFINE_SYMBOL "rtlsdr_STATIC")
########################################################################
# Install built library files
########################################################################

View File

@ -22,7 +22,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#ifndef _WIN32
#include <unistd.h>
#endif
#include <libusb.h>