Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Merge pull request keenerd#13 from librtlsdr/DRPCWIN
Browse files Browse the repository at this point in the history
Disable RPC for Windows Builds
  • Loading branch information
racerxdl authored Aug 17, 2016
2 parents df4a682 + 7228e75 commit 5cec665
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 10 deletions.
5 changes: 5 additions & 0 deletions include/rtl-sdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
extern "C" {
#endif

#ifndef WIN32
#define _ENABLE_RPC
#endif


#include <stdint.h>
#include <rtl-sdr_export.h>
#include <rtl_tcp.h>
Expand Down
26 changes: 22 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ MACRO(RTLSDR_APPEND_SRCS)
LIST(APPEND rtlsdr_srcs ${ARGV})
ENDMACRO(RTLSDR_APPEND_SRCS)

if(NOT WIN32)
RTLSDR_APPEND_SRCS(
librtlsdr.c
tuner_e4k.c
Expand All @@ -31,6 +32,16 @@ RTLSDR_APPEND_SRCS(
rtlsdr_rpc.c
rtlsdr_rpc_msg.c
)
else()
RTLSDR_APPEND_SRCS(
librtlsdr.c
tuner_e4k.c
tuner_fc0012.c
tuner_fc0013.c
tuner_fc2580.c
tuner_r82xx.c
)
endif()

########################################################################
# Set up Windows DLL resource files
Expand Down Expand Up @@ -94,8 +105,12 @@ add_executable(rtl_ir rtl_ir.c)
add_executable(rtl_eeprom rtl_eeprom.c)
add_executable(rtl_adsb rtl_adsb.c)
add_executable(rtl_power rtl_power.c)
add_executable(rtl_rpcd rtl_rpcd.c rtlsdr_rpc_msg.c)
set(INSTALL_TARGETS rtlsdr_shared rtlsdr_static rtl_sdr rtl_tcp rtl_test rtl_fm rtl_ir rtl_eeprom rtl_adsb rtl_power rtl_rpcd)
if (NOT WIN32)
add_executable(rtl_rpcd rtl_rpcd.c rtlsdr_rpc_msg.c)
set(INSTALL_TARGETS rtlsdr_shared rtlsdr_static rtl_sdr rtl_tcp rtl_test rtl_fm rtl_ir rtl_eeprom rtl_adsb rtl_power rtl_rpcd)
else()
set(INSTALL_TARGETS rtlsdr_shared rtlsdr_static rtl_sdr rtl_tcp rtl_test rtl_fm rtl_ir rtl_eeprom rtl_adsb rtl_power)
endif()

target_link_libraries(rtl_sdr rtlsdr_shared convenience_static
${LIBUSB_LIBRARIES}
Expand Down Expand Up @@ -129,10 +144,13 @@ target_link_libraries(rtl_power rtlsdr_shared convenience_static
${LIBUSB_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
if(NOT WIN32)
target_link_libraries(rtl_rpcd rtlsdr_shared convenience_static
${LIBUSB_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
endif()

if(UNIX)
target_link_libraries(rtl_fm m)
target_link_libraries(rtl_ir m)
Expand All @@ -154,7 +172,7 @@ target_link_libraries(rtl_ir libgetopt_static)
target_link_libraries(rtl_eeprom libgetopt_static)
target_link_libraries(rtl_adsb libgetopt_static)
target_link_libraries(rtl_power libgetopt_static)
target_link_libraries(rtl_rpcd ws2_32 libgetopt_static)
#target_link_libraries(rtl_rpcd ws2_32 libgetopt_static)
set_property(TARGET rtl_sdr APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
set_property(TARGET rtl_tcp APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
set_property(TARGET rtl_test APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
Expand All @@ -163,7 +181,7 @@ set_property(TARGET rtl_ir APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
set_property(TARGET rtl_eeprom APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
set_property(TARGET rtl_adsb APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
set_property(TARGET rtl_power APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
set_property(TARGET rtl_rpcd APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
#set_property(TARGET rtl_rpcd APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
endif()
########################################################################
# Install built library files & utilities
Expand Down
Loading

0 comments on commit 5cec665

Please sign in to comment.