move some examples to utils/ since they are not examples anymore :) (Fixes Issue 164)
This commit is contained in:
parent
311d12feef
commit
8c7b61eaba
34 changed files with 126 additions and 83 deletions
|
|
@ -1,23 +1,15 @@
|
|||
SET(EXAMPLES-SOURCES nfc-anticol nfc-dep-initiator nfc-dep-target nfc-emulate-forum-tag4 nfc-emulate-tag nfc-emulate-uid nfc-list nfc-poll nfc-relay nfc-relay-picc nfc-mfclassic nfc-mfultralight)
|
||||
#TODO pn53x-diagnose pn53x-sam pn53x-tamashell
|
||||
SET(EXAMPLES-SOURCES nfc-anticol nfc-dep-initiator nfc-dep-target nfc-emulate-tag nfc-emulate-uid nfc-poll nfc-relay pn53x-diagnose pn53x-sam pn53x-tamashell)
|
||||
|
||||
# XXX: Examples should not use private API!
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libnfc)
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIRS} ${PCSC_INCLUDE_DIRS})
|
||||
LINK_DIRECTORIES(${LIBUSB_LIBRARY_DIRS} ${PCSC_LIBRARY_DIRS})
|
||||
|
||||
ADD_LIBRARY(nfc-utils nfc-utils)
|
||||
|
||||
# Examples
|
||||
FOREACH(source ${EXAMPLES-SOURCES})
|
||||
IF((${source} MATCHES "nfc-mfultralight") OR (${source} MATCHES "nfc-mfclassic"))
|
||||
ADD_EXECUTABLE(${source} ${source}.c mifare)
|
||||
ELSE()
|
||||
ADD_EXECUTABLE(${source} ${source}.c)
|
||||
ENDIF((${source} MATCHES "nfc-mfultralight") OR (${source} MATCHES "nfc-mfclassic"))
|
||||
ADD_EXECUTABLE(${source} ${source}.c)
|
||||
TARGET_LINK_LIBRARIES(${source} nfc)
|
||||
TARGET_LINK_LIBRARIES(${source} nfc-utils)
|
||||
TARGET_LINK_LIBRARIES(${source} nfcutils)
|
||||
INSTALL(TARGETS ${source} RUNTIME DESTINATION bin COMPONENT examples)
|
||||
ENDFOREACH(source)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue