Fix CMake build.

This commit is contained in:
Romuald Conty 2009-12-01 11:39:35 +00:00
parent f9f49cc0d0
commit 56219ced36
4 changed files with 12 additions and 8 deletions

View file

@ -1,8 +1,8 @@
PROJECT(libnfc C)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "2")
SET(VERSION_PATCH "1")
SET(VERSION_MINOR "3")
SET(VERSION_PATCH "0")
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
@ -14,10 +14,9 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_SOURCE
# make it easy to locate CMake modules for finding libraries
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/")
SET(LIBNFC_VERBOSE_OUTPUT OFF CACHE BOOL "Verbose output of communication with the NFC chip")
SET(LIBNFC_LANG_C99 OFF CACHE BOOL "Use C99 language standard (GCC only)")
SET(LIBNFC_DEBUG_OUTPUT OFF CACHE BOOL "Debug output of communication with the NFC chip")
SET(LIBNFC_PCSC ON CACHE BOOL "Enable PC/SC support (ACR122)")
SET(LIBNFC_USB OFF CACHE BOOL "Enable direct USB communication support (PN531 and PN533)")
SET(LIBNFC_USB ON CACHE BOOL "Enable direct USB communication support (PN531 and PN533)")
SET(LIBNFC_DISABLE_SERIAL_AUTOPROBE OFF CACHE BOOL "Disable serial autoprobe")
IF(DEFINED CMAKE_INSTALL_LIBDIR)
@ -38,6 +37,12 @@ IF(NOT DEFINED SHARE_INSTALL_PREFIX)
SET(SHARE_INSTALL_PREFIX share)
ENDIF(NOT DEFINED SHARE_INSTALL_PREFIX)
IF(LIBNFC_DEBUG_OUTPUT)
ADD_DEFINITIONS(-DDEBUG -g3)
ENDIF(LIBNFC_DEBUG_OUTPUT)
ADD_DEFINITIONS(-Wall -pedantic -std=c99)
IF(NOT MSVC)
# Set some pkg-config variables
SET(prefix ${CMAKE_INSTALL_PREFIX})

View file

@ -67,7 +67,7 @@ int main(int argc, char *argv[])
print_usage(argv);
return 0;
} else if (0 == strcmp(argv[arg], "-q")) {
INFO("Quiet mode.");
INFO("%s", "Quiet mode.");
quiet_output = true;
} else if((arg == argc-1) && (strlen(argv[arg]) == 8)) { // See if UID was specified as HEX string
byte_t abtTmp[3] = { 0x00,0x00,0x00 };

View file

@ -70,7 +70,7 @@ int main(int argc,char* argv[])
print_usage(argv);
return 0;
} else if (0 == strcmp(argv[arg], "-q")) {
INFO("Quiet mode.");
INFO("%s", "Quiet mode.");
quiet_output = true;
} else {
ERR("%s is not supported option.", argv[arg]);

View file

@ -136,7 +136,6 @@ acr122_list_devices(nfc_device_desc_t pnddDevices[], size_t szDevices, size_t *p
size_t szDeviceNamesLen = sizeof(acDeviceNames);
acr122_spec_t as;
uint32_t uiBusIndex = 0;
char *pcFirmware;
SCARDCONTEXT *pscc;
// Clear the reader list