Updated libusb instructions

Vincent Sonnier 2018-05-20 08:10:12 +02:00
parent 618493ec89
commit 306505783a
1 changed files with 14 additions and 5 deletions

@ -107,9 +107,18 @@ Copy the file `pthreadVC2.dll` in the `C:\MSVCDev\CubicSDR_win64\x64` directory
### libusb
Easiest way: use a pre-compiled `librtlsdr` binary which also package `libusb` from the [librtlsdr Releases](https://github.com/librtlsdr/librtlsdr/releases) page and choose the "x64" version.
Or compile it from source:
Easiest way: use a pre-compiled `librtlsdr` binary which also package `libusb` from the [librtlsdr Releases page](https://github.com/librtlsdr/librtlsdr/releases) and choose the "x64" version.
Or use pre-compiled binaries ZIP from the [libusb Releases page](https://github.com/libusb/libusb/releases):
* Unpack it as the following:
````
C:\MSVCDev\libusb-release\MS64\dll\libusb-1.0.dll
C:\MSVCDev\libusb-release\MS64\dll\libusb-1.0.lib
C:\MSVCDev\libusb-release\libusb-1.0\include\*.h
````
Or compile it from source: (TODO: make VS2017 compiler crash)
* Clone or download https://github.com/libusb/libusb to `C:\MSVCDev\libusb`
* Build it using `C:\MSVCDev\libusb\msvc\libusb_2017.sln` choosing the `Release` and `x64` configuration.
@ -121,8 +130,8 @@ Copy the file `libusb-1.0.dll` in the `C:\MSVCDev\CubicSDR_win64\x64` directory
* Launch CMake, set source path to `C:/MSVCDev/librtlsdr/`
* Set destination to `C:/MSVCDev/librtlsdr_win64/`
* Click "Configure" and choose "Visual Studio 15 2017 Win64" and Finish
* Set LIBUSB_INCLUDE_DIR to `C:/MSVCDev/libusb/`
* Set LIBUSB_LIBRARIES to `C:/MSVCDev/libusb/x64/Release/dll/libusb-1.0.lib`
* Set LIBUSB_INCLUDE_DIR to `C:/MSVCDev/libusb-release/libusb-1.0/include`
* Set LIBUSB_LIBRARIES to `C:/MSVCDev/libusb-release/MS64/dll/libusb-1.0.lib`
* Set THREADS_PTHREADS_INCLUDE_DIR to `C:/MSVCDev/pthreads-win32/include`
* Set THREADS_PTHREADS_WIN32_LIBRARY to `C:/MSVCDev/pthreads-win32/lib/x64/pthreadVC2.lib`
* Click "Configure" again and then click "Generate"
@ -133,7 +142,7 @@ From the prompt:
```
C:\> cd C:\MSVCDev\
C:\MSVCDEV> cmake --build librtlsdr_win64 --config Release --target install
C:\MSVCDEV> cmake --build librtlsdr_win64 --config Release
... Bunch of building ...
0 Error(s)
```