|
| 1 | +project(rtlsdr) |
| 2 | +cmake_minimum_required(VERSION 2.8) |
| 3 | + |
| 4 | +# created and tested with |
| 5 | +# Qt 5.5.1 for Windows 32-bit (MinGW 4.9.2) from |
| 6 | +# https://www.qt.io/download-open-source/#section-2 |
| 7 | +# |
| 8 | +# and QtCreator 4.0.0 |
| 9 | +# |
| 10 | +# and LibUSB 1.0.20 from |
| 11 | +# https://sourceforge.net/projects/libusb/files/ |
| 12 | +# libusb-1.0.20.7z |
| 13 | +# |
| 14 | + |
| 15 | +# edit this path |
| 16 | +SET( LIBUSBBASE C:/src/_foreign/libusb-1.0.20 ) |
| 17 | + |
| 18 | + |
| 19 | +add_definitions( -DWIN32 -D_WIN32 -DNDEBUG ) |
| 20 | + |
| 21 | +include_directories( |
| 22 | + ../include |
| 23 | + ${LIBUSBBASE}/include/libusb-1.0 |
| 24 | +) |
| 25 | + |
| 26 | +SET( LIBUSB ${LIBUSBBASE}/MinGW32/static/libusb-1.0.a ) |
| 27 | + |
| 28 | +SET( SOCKLIBS ws2_32 wsock32 ) |
| 29 | + |
| 30 | +SET( RTLLIBFILES |
| 31 | + ../include/rtl_tcp.h |
| 32 | + ../include/reg_field.h |
| 33 | + ../include/rtlsdr_i2c.h |
| 34 | + |
| 35 | + ../src/convenience/convenience.c |
| 36 | + ../src/convenience/convenience.h |
| 37 | + |
| 38 | + ../src/getopt/getopt.c |
| 39 | + ../src/getopt/getopt.h |
| 40 | + |
| 41 | + ../include/rtl-sdr_export.h |
| 42 | + ../include/rtl-sdr.h |
| 43 | + ../src/librtlsdr.c |
| 44 | + |
| 45 | + ../include/tuner_e4k.h |
| 46 | + ../src/tuner_e4k.c |
| 47 | + |
| 48 | + ../include/tuner_fc0012.h |
| 49 | + ../src/tuner_fc0012.c |
| 50 | + |
| 51 | + ../include/tuner_fc0013.h |
| 52 | + ../src/tuner_fc0013.c |
| 53 | + |
| 54 | + ../include/tuner_fc2580.h |
| 55 | + ../src/tuner_fc2580.c |
| 56 | + |
| 57 | + ../include/tuner_r82xx.h |
| 58 | + ../src/tuner_r82xx.c |
| 59 | +) |
| 60 | + |
| 61 | +add_executable( rtl_test ../src/rtl_test.c ${RTLLIBFILES} ) |
| 62 | +target_link_libraries( rtl_test ${LIBUSB} ) |
| 63 | + |
| 64 | +add_executable( rtl_fm ../src/rtl_fm.c ${RTLLIBFILES} ) |
| 65 | +target_link_libraries( rtl_fm ${LIBUSB} ) |
| 66 | + |
| 67 | +add_executable( rtl_tcp ../src/rtl_tcp.c ${RTLLIBFILES} ) |
| 68 | +target_link_libraries( rtl_tcp ${LIBUSB} ${SOCKLIBS} ) |
| 69 | + |
| 70 | +add_executable( rtl_adsb ../src/rtl_adsb.c ${RTLLIBFILES} ) |
| 71 | +target_link_libraries( rtl_adsb ${LIBUSB} ) |
| 72 | + |
| 73 | +add_executable( rtl_power ../src/rtl_power.c ${RTLLIBFILES} ) |
| 74 | +target_link_libraries( rtl_power ${LIBUSB} ) |
| 75 | + |
0 commit comments