Enables logging by default when using CMake
This commit is contained in:
parent
93e26b1475
commit
cf9e02879a
2 changed files with 12 additions and 6 deletions
|
@ -27,10 +27,15 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/incl
|
||||||
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")
|
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
SET(LIBNFC_DEBUG_OUTPUT OFF CACHE BOOL "Debug output of communication with the NFC chip")
|
SET(LIBNFC_LOG ON CACHE BOOL "Enable log facility")
|
||||||
IF(LIBNFC_DEBUG_OUTPUT)
|
IF(LIBNFC_LOG)
|
||||||
ADD_DEFINITIONS(-DDEBUG -DLOG -g3)
|
ADD_DEFINITIONS(-DLOG)
|
||||||
ENDIF(LIBNFC_DEBUG_OUTPUT)
|
ENDIF(LIBNFC_LOG)
|
||||||
|
|
||||||
|
SET(LIBNFC_DEBUG_MODE OFF CACHE BOOL "Debug mode")
|
||||||
|
IF(LIBNFC_DEBUG_MODE)
|
||||||
|
ADD_DEFINITIONS(-DDEBUG -g3)
|
||||||
|
ENDIF(LIBNFC_DEBUG_MODE)
|
||||||
|
|
||||||
# Doxygen
|
# Doxygen
|
||||||
SET(builddir "${CMAKE_BINARY_DIR}")
|
SET(builddir "${CMAKE_BINARY_DIR}")
|
||||||
|
|
|
@ -39,9 +39,10 @@ ENDIF(LIBUSB_FOUND)
|
||||||
# Library
|
# Library
|
||||||
SET(LIBRARY_SOURCES nfc nfc-device nfc-emulation nfc-internal conf iso14443-subr mirror-subr target-subr log ${DRIVERS_SOURCES} ${BUSES_SOURCES} ${CHIPS_SOURCES} ${WINDOWS_SOURCES})
|
SET(LIBRARY_SOURCES nfc nfc-device nfc-emulation nfc-internal conf iso14443-subr mirror-subr target-subr log ${DRIVERS_SOURCES} ${BUSES_SOURCES} ${CHIPS_SOURCES} ${WINDOWS_SOURCES})
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
IF(LIBNFC_DEBUG_OUTPUT)
|
|
||||||
|
IF(LIBNFC_LOG)
|
||||||
LIST(APPEND LIBRARY_SOURCES log-printf)
|
LIST(APPEND LIBRARY_SOURCES log-printf)
|
||||||
ENDIF(LIBNFC_DEBUG_OUTPUT)
|
ENDIF(LIBNFC_LOG)
|
||||||
ADD_LIBRARY(nfc SHARED ${LIBRARY_SOURCES})
|
ADD_LIBRARY(nfc SHARED ${LIBRARY_SOURCES})
|
||||||
|
|
||||||
IF(PCSC_FOUND)
|
IF(PCSC_FOUND)
|
||||||
|
|
Loading…
Reference in a new issue