Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmake/modules/FindLIBRT.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include(CheckLibraryExists)
CHECK_LIBRARY_EXISTS(rt clock_gettime "" LIBRT_FOUND)
find_package_handle_standard_args(LIBRT DEFAULT_MSG LIBRT_FOUND)
2 changes: 2 additions & 0 deletions cmake/modules/LibnfcDrivers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ IF(LIBNFC_DRIVER_ACR122_USB)
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122_usb")
ENDIF(LIBNFC_DRIVER_ACR122_USB)

FIND_PACKAGE(LIBRT)

IF(LIBNFC_DRIVER_ACR122S)
ADD_DEFINITIONS("-DDRIVER_ACR122S_ENABLED")
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122s")
Expand Down
1 change: 1 addition & 0 deletions cmake/modules/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
EXTRA_DIST = \
COPYING-CMAKE-SCRIPTS \
FindLIBUSB.cmake \
FindLIBRT.cmake \
FindPCSC.cmake \
UseDoxygen.cmake \
LibnfcDrivers.cmake
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ PKG_CONFIG_REQUIRES=""

LIBNFC_CHECK_LIBUSB
LIBNFC_CHECK_PCSC
AC_CHECK_LIB(rt,clock_gettime,[LIBS="$LIBS -lrt"])

AC_SUBST(PKG_CONFIG_REQUIRES)

Expand Down
4 changes: 4 additions & 0 deletions libnfc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ IF(LIBUSB_FOUND)
TARGET_LINK_LIBRARIES(nfc ${LIBUSB_LIBRARIES})
ENDIF(LIBUSB_FOUND)

IF(LIBRT_FOUND)
TARGET_LINK_LIBRARIES(nfc rt)
ENDIF(LIBRT_FOUND)

SET_TARGET_PROPERTIES(nfc PROPERTIES SOVERSION 5 VERSION 5.0.1)

IF(WIN32)
Expand Down