diff --git a/win32-qtcreator/CMakeLists.txt b/win32-qtcreator/CMakeLists.txt new file mode 100644 index 00000000..539eab48 --- /dev/null +++ b/win32-qtcreator/CMakeLists.txt @@ -0,0 +1,75 @@ +project(rtlsdr) +cmake_minimum_required(VERSION 2.8) + +# created and tested with +# Qt 5.5.1 for Windows 32-bit (MinGW 4.9.2) from +# https://www.qt.io/download-open-source/#section-2 +# +# and QtCreator 4.0.0 +# +# and LibUSB 1.0.20 from +# https://sourceforge.net/projects/libusb/files/ +# libusb-1.0.20.7z +# + +# edit this path +SET( LIBUSBBASE C:/src/_foreign/libusb-1.0.20 ) + + +add_definitions( -DWIN32 -D_WIN32 -DNDEBUG ) + +include_directories( + ../include + ${LIBUSBBASE}/include/libusb-1.0 +) + +SET( LIBUSB ${LIBUSBBASE}/MinGW32/static/libusb-1.0.a ) + +SET( SOCKLIBS ws2_32 wsock32 ) + +SET( RTLLIBFILES + ../include/rtl_tcp.h + ../include/reg_field.h + ../include/rtlsdr_i2c.h + + ../src/convenience/convenience.c + ../src/convenience/convenience.h + + ../src/getopt/getopt.c + ../src/getopt/getopt.h + + ../include/rtl-sdr_export.h + ../include/rtl-sdr.h + ../src/librtlsdr.c + + ../include/tuner_e4k.h + ../src/tuner_e4k.c + + ../include/tuner_fc0012.h + ../src/tuner_fc0012.c + + ../include/tuner_fc0013.h + ../src/tuner_fc0013.c + + ../include/tuner_fc2580.h + ../src/tuner_fc2580.c + + ../include/tuner_r82xx.h + ../src/tuner_r82xx.c +) + +add_executable( rtl_test ../src/rtl_test.c ${RTLLIBFILES} ) +target_link_libraries( rtl_test ${LIBUSB} ) + +add_executable( rtl_fm ../src/rtl_fm.c ${RTLLIBFILES} ) +target_link_libraries( rtl_fm ${LIBUSB} ) + +add_executable( rtl_tcp ../src/rtl_tcp.c ${RTLLIBFILES} ) +target_link_libraries( rtl_tcp ${LIBUSB} ${SOCKLIBS} ) + +add_executable( rtl_adsb ../src/rtl_adsb.c ${RTLLIBFILES} ) +target_link_libraries( rtl_adsb ${LIBUSB} ) + +add_executable( rtl_power ../src/rtl_power.c ${RTLLIBFILES} ) +target_link_libraries( rtl_power ${LIBUSB} ) + diff --git a/win32-qtcreator/README.txt b/win32-qtcreator/README.txt new file mode 100644 index 00000000..e92aabb9 --- /dev/null +++ b/win32-qtcreator/README.txt @@ -0,0 +1,31 @@ + +there is an outdated "How to compile new releases of librtlsdr (and tools) on Windows" at +https://www.reddit.com/r/RTLSDR/comments/uce3e/how_to_compile_new_releases_of_librtlsdr_and/ +unfortunately the link to the CMakeLists.txt is broken! + +so, i needed to find another solution .. + + +1) aquire and install Qt 5.5.x for Windows 32-bit (MinGW 4.9.2) from +https://www.qt.io/download-open-source/#section-2 + +2) aquire and install QtCreator 4.0.x +from same site as 1) +probably this step is not necessary and you can use the qtcreator IDE from 1) + +3) aquire LibUSB 1.0.20 from +https://sourceforge.net/projects/libusb/files/ +last tested: libusb-1.0.20.7z + +and place the file at C:/src/_foreign/libusb-1.0.20 + +or replace LIBUSBBASE path in CMakeLists.txt + +4) start qtcreator and open the (modified) CMakeLists.txt +configure compiler/environment and compile + + +the resulting executables have no other dependencies than libwinpthread-1.dll +from the MINGW system at C:\Qt\Qt5.5.1\Tools\mingw492_32\bin\ + or C:\Qt\Qt5.5.1\5.5\mingw492_32\bin +