Fixed issues compiling on Windows with MSVC, CMake and NMake (#61)

When trying to build a simple program which uses librtlsdr
as a subproject on Windows, CMake reported several problems
which were solved by:
- Added complete name of libusb in FindLibUSB module.
- Replaced CMAKE_SOURCE_DIR to PROJECT_SOURCE_DIR in src/CMakeLists.txt.
- Replaced header file <afxres.h> in src/rtlsdr.rc.in (only present when windows MFC is
  installed) by <windows.h> which defines the same constants.
This commit is contained in:
leonsal
2019-12-03 16:47:17 -03:00
committed by Steve Markgraf
parent bd73737c49
commit b5af355b1d
3 changed files with 5 additions and 3 deletions

View File

@ -9,7 +9,7 @@ if(NOT LIBUSB_FOUND)
)
#standard library name for libusb-1.0
set(libusb1_library_names usb-1.0)
set(libusb1_library_names usb-1.0 libusb-1.0)
#libusb-1.0 compatible library on freebsd
if((CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") OR (CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD"))