Skip to content

Commit

Permalink
updated libusb msvc config file
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoussin committed Nov 24, 2020
1 parent d9795ba commit 66c07ed
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 23 deletions.
56 changes: 34 additions & 22 deletions src/deps/msvc/config.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
#ifndef CONFIG_H
#define CONFIG_H

/* config.h. Manual config for MSVC. */

#ifndef _MSC_VER
#warn "msvc/config.h shouldn't be included for your development environment."
#error "Please make sure the msvc/ directory is removed from your build path."
#endif

/* Visual Studio 2013 or later is required */
#if (_MSC_VER < 1800)
#error "Visual Studio 2013 or later is required."
#endif

/* Visual Studio 2013 does not support __func__ */
#if (_MSC_VER < 1900)
#define __func__ __FUNCTION__
#endif

/* Visual Studio 2015 and later defines timespec */
#if (_MSC_VER >= 1900)
#define _TIMESPEC_DEFINED 1
#endif

/* Disable: warning C4127: conditional expression is constant */
#pragma warning(disable:4127)
/* Disable: warning C4200: nonstandard extension used : zero-sized array in struct/union */
#pragma warning(disable:4200)
/* Disable: warning C4201: nonstandard extension used : nameless struct/union */
#pragma warning(disable:4201)
/* Disable: warning C4324: structure was padded due to __declspec(align()) */
#pragma warning(disable:4324)
/* Disable: warning C6258: Using TerminateThread does not allow proper thread clean up */
#pragma warning(disable:6258)
/* Disable: warning C4996: 'GetVersionA': was declared deprecated */
/* Disable: warning C4996: 'GetVersionExA': was declared deprecated */
#pragma warning(disable:4996)

#if defined(_PREFAST_)
Expand All @@ -22,29 +41,22 @@
#pragma warning(disable:28125)
#endif

/* Default visibility */
/* Define to the attribute for default visibility. */
#define DEFAULT_VISIBILITY /**/

/* Enable global message logging */
#define ENABLE_LOGGING 1

/* Uncomment to start with debug message logging enabled */
// #define ENABLE_DEBUG_LOGGING 1
/* Define to 1 to start with debug message logging enabled. */
/* #undef ENABLE_DEBUG_LOGGING */

/* Uncomment to enabling logging to system log */
// #define USE_SYSTEM_LOGGING_FACILITY
/* Define to 1 to enable message logging. */
#define ENABLE_LOGGING 1

/* type of second poll() argument */
#define POLL_NFDS_TYPE unsigned int
/* Define to 1 if using the Windows events abstraction. */
#define EVENTS_WINDOWS 1

/* Windows/WinCE backend */
#if defined(_WIN32_WCE)
#define OS_WINCE 1
#define HAVE_MISSING_H
#else
#define OS_WINDOWS 1
#define HAVE_SYS_TYPES_H 1
#endif
/* Define to 1 if using Windows threads. */
#define THREADS_WINDOWS 1

/* Define to 1 to output logging messages to the systemwide log. */
/* #undef USE_SYSTEM_LOGGING_FACILITY */

#endif // CONFIG_H
#endif /* #ifndef CONFIG_H */
2 changes: 1 addition & 1 deletion src/usb/files.pri
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ win32 {
$$LIBUSB_ROOT_REL/libusb/os/windows_usbdk.c \
$$LIBUSB_ROOT_REL/libusb/os/windows_winusb.c

INCLUDEPATH += $$PWD/../deps/msvc $$LIBUSB_ROOT_REL $$LIBUSB_ROOT_REL/libusb $$LIBUSB_ROOT_REL/libusb/msvc $$HIDAPI_ROOT_REL/hidapi
INCLUDEPATH += $$PWD/../deps/msvc $$LIBUSB_ROOT_REL $$LIBUSB_ROOT_REL/libusb $$HIDAPI_ROOT_REL/hidapi
}

# We build libusb and hidapi ourselves instead of using a library
Expand Down

0 comments on commit 66c07ed

Please sign in to comment.