2012-03-01 13:00:23 +01:00
|
|
|
SET(EXAMPLES-SOURCES
|
|
|
|
nfc-anticol
|
|
|
|
nfc-dep-initiator
|
|
|
|
nfc-dep-target
|
|
|
|
nfc-emulate-forum-tag2
|
|
|
|
nfc-emulate-tag
|
|
|
|
nfc-emulate-uid
|
2012-05-17 21:22:25 +02:00
|
|
|
nfc-mfsetuid
|
2012-03-01 13:00:23 +01:00
|
|
|
nfc-poll
|
|
|
|
nfc-relay
|
2021-06-13 20:00:52 +02:00
|
|
|
nfc-st25tb
|
2017-03-31 22:46:11 +02:00
|
|
|
pn53x-diagnose
|
|
|
|
pn53x-sam
|
|
|
|
pn53x-tamashell
|
2012-03-01 13:00:23 +01:00
|
|
|
)
|
2009-10-06 12:01:18 +02:00
|
|
|
|
2010-04-07 16:37:19 +02:00
|
|
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libnfc)
|
2009-10-06 12:01:18 +02:00
|
|
|
|
|
|
|
# Examples
|
|
|
|
FOREACH(source ${EXAMPLES-SOURCES})
|
2013-02-01 16:19:02 +01:00
|
|
|
SET (TARGETS ${source}.c)
|
|
|
|
|
|
|
|
IF(WIN32)
|
|
|
|
SET(RC_COMMENT "${PACKAGE_NAME} example")
|
|
|
|
SET(RC_INTERNAL_NAME ${source})
|
|
|
|
SET(RC_ORIGINAL_NAME ${source}.exe)
|
2020-07-11 15:12:57 +02:00
|
|
|
# RC_FILE_TYPE: VFT_APP
|
2020-07-07 19:40:46 +02:00
|
|
|
SET(RC_FILE_TYPE 0x00000001L)
|
2013-02-05 17:24:23 +01:00
|
|
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../contrib/win32/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/../windows/${source}.rc @ONLY)
|
2013-02-01 16:19:02 +01:00
|
|
|
LIST(APPEND TARGETS ${CMAKE_CURRENT_BINARY_DIR}/../windows/${source}.rc)
|
2021-06-13 22:24:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
IF(${source} MATCHES "nfc-st25tb")
|
|
|
|
LIST(APPEND TARGETS ${CMAKE_CURRENT_SOURCE_DIR}/../contrib/win32/getopt.c)
|
|
|
|
ENDIF()
|
2013-02-01 16:19:02 +01:00
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(${source} ${TARGETS})
|
2009-10-06 12:01:18 +02:00
|
|
|
TARGET_LINK_LIBRARIES(${source} nfc)
|
2011-09-30 13:33:31 +02:00
|
|
|
TARGET_LINK_LIBRARIES(${source} nfcutils)
|
2009-10-06 12:01:18 +02:00
|
|
|
INSTALL(TARGETS ${source} RUNTIME DESTINATION bin COMPONENT examples)
|
|
|
|
ENDFOREACH(source)
|
|
|
|
|
2011-04-20 15:18:38 +02:00
|
|
|
#install required libraries
|
|
|
|
IF(WIN32)
|
|
|
|
INCLUDE(InstallRequiredSystemLibraries)
|
|
|
|
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/FixBundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake @ONLY)
|
|
|
|
INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake)
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
2010-11-17 09:29:41 +01:00
|
|
|
IF(NOT WIN32)
|
2010-03-23 11:00:48 +01:00
|
|
|
# Manuals for the examples
|
|
|
|
FILE(GLOB manuals "${CMAKE_CURRENT_SOURCE_DIR}/*.1")
|
|
|
|
INSTALL(FILES ${manuals} DESTINATION ${SHARE_INSTALL_PREFIX}/man/man1 COMPONENT manuals)
|
2010-11-17 09:29:41 +01:00
|
|
|
ENDIF(NOT WIN32)
|