Windows: Fix nfc-scan-device to compile by linking in contrib/nfc_win32.c
Re-factored the executable call with a list that is created, so that its easier to modify per tool.
This commit is contained in:
parent
9eeaf33b94
commit
87182b5a65
1 changed files with 13 additions and 3 deletions
|
@ -15,13 +15,23 @@ TARGET_LINK_LIBRARIES(nfcutils nfc)
|
|||
|
||||
# Examples
|
||||
FOREACH(source ${UTILS-SOURCES})
|
||||
SET (TARGETS ${source}.c)
|
||||
|
||||
IF((${source} MATCHES "nfc-mfultralight") OR (${source} MATCHES "nfc-mfclassic"))
|
||||
ADD_EXECUTABLE(${source} ${source}.c mifare)
|
||||
ELSE()
|
||||
ADD_EXECUTABLE(${source} ${source}.c)
|
||||
LIST(APPEND TARGETS mifare)
|
||||
ENDIF((${source} MATCHES "nfc-mfultralight") OR (${source} MATCHES "nfc-mfclassic"))
|
||||
|
||||
IF(${source} MATCHES "nfc-scan-device")
|
||||
LIST(APPEND TARGETS ../contrib/win32/nfc_win32)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../contrib/win32)
|
||||
ENDIF(${source} MATCHES "nfc-scan-device")
|
||||
|
||||
ADD_EXECUTABLE(${source} ${TARGETS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(${source} nfc)
|
||||
TARGET_LINK_LIBRARIES(${source} nfcutils)
|
||||
|
||||
|
||||
INSTALL(TARGETS ${source} RUNTIME DESTINATION bin COMPONENT utils)
|
||||
ENDFOREACH(source)
|
||||
|
||||
|
|
Loading…
Reference in a new issue