From 2a33e28db9b35c09f5488804f613bcc5098d4f72 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Tue, 9 Feb 2010 16:10:45 +0000 Subject: [PATCH] Add workaround for libusb while using CMake. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e67306b..8d712d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,10 +56,15 @@ IF(LIBNFC_DEBUG_OUTPUT) ADD_DEFINITIONS(-DDEBUG -g3) ENDIF(LIBNFC_DEBUG_OUTPUT) +# CMake have config.h generation, so we must define this ADD_DEFINITIONS("-DHAVE_CONFIG_H") +# Make sure we will not miss some warnings ;) ADD_DEFINITIONS(-Wall -pedantic -std=c99) +# Workarounds for libusb in C99 +ADD_DEFINITIONS(-Du_int8_t=uint8_t -Du_int16_t=uint16_t) + IF(NOT MSVC) # Set some pkg-config variables SET(prefix ${CMAKE_INSTALL_PREFIX})