34 lines
971 B
CMake
34 lines
971 B
CMake
SET(EXAMPLES-SOURCES
|
|
nfc-anticol
|
|
nfc-dep-initiator
|
|
nfc-dep-target
|
|
nfc-emulate-forum-tag2
|
|
nfc-emulate-tag
|
|
nfc-emulate-uid
|
|
nfc-mfsetuid
|
|
nfc-poll
|
|
nfc-relay
|
|
)
|
|
|
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libnfc)
|
|
|
|
# Examples
|
|
FOREACH(source ${EXAMPLES-SOURCES})
|
|
ADD_EXECUTABLE(${source} ${source}.c)
|
|
TARGET_LINK_LIBRARIES(${source} nfc)
|
|
TARGET_LINK_LIBRARIES(${source} nfcutils)
|
|
INSTALL(TARGETS ${source} RUNTIME DESTINATION bin COMPONENT examples)
|
|
ENDFOREACH(source)
|
|
|
|
#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)
|
|
|
|
IF(NOT WIN32)
|
|
# Manuals for the examples
|
|
FILE(GLOB manuals "${CMAKE_CURRENT_SOURCE_DIR}/*.1")
|
|
INSTALL(FILES ${manuals} DESTINATION ${SHARE_INSTALL_PREFIX}/man/man1 COMPONENT manuals)
|
|
ENDIF(NOT WIN32)
|