Path: blob/main/contrib/libfido2/examples/CMakeLists.txt
39478 views
# Copyright (c) 2018 Yubico AB. All rights reserved.1# Use of this source code is governed by a BSD-style2# license that can be found in the LICENSE file.3# SPDX-License-Identifier: BSD-2-Clause45list(APPEND COMPAT_SOURCES6../openbsd-compat/clock_gettime.c7../openbsd-compat/getopt_long.c8../openbsd-compat/strlcat.c9../openbsd-compat/strlcpy.c10)1112if(WIN32 AND BUILD_SHARED_LIBS AND NOT CYGWIN AND NOT MSYS)13list(APPEND COMPAT_SOURCES ../openbsd-compat/posix_win.c)14endif()1516# enable -Wconversion -Wsign-conversion17if(NOT MSVC)18set_source_files_properties(assert.c cred.c info.c manifest.c reset.c19retries.c setpin.c util.c PROPERTIES COMPILE_FLAGS20"-Wconversion -Wsign-conversion")21endif()2223# manifest24add_executable(manifest manifest.c ${COMPAT_SOURCES})25target_link_libraries(manifest ${_FIDO2_LIBRARY})2627# info28add_executable(info info.c ${COMPAT_SOURCES})29target_link_libraries(info ${_FIDO2_LIBRARY})3031# reset32add_executable(reset reset.c util.c ${COMPAT_SOURCES})33target_link_libraries(reset ${_FIDO2_LIBRARY})3435# cred36add_executable(cred cred.c util.c ${COMPAT_SOURCES})37target_link_libraries(cred ${_FIDO2_LIBRARY})3839# assert40add_executable(assert assert.c util.c ${COMPAT_SOURCES})41target_link_libraries(assert ${_FIDO2_LIBRARY})4243# setpin44add_executable(setpin setpin.c ${COMPAT_SOURCES})45target_link_libraries(setpin ${_FIDO2_LIBRARY})4647# retries48add_executable(retries retries.c ${COMPAT_SOURCES})49target_link_libraries(retries ${_FIDO2_LIBRARY})5051# select52add_executable(select select.c ${COMPAT_SOURCES})53target_link_libraries(select ${_FIDO2_LIBRARY})5455if(MINGW)56# needed for nanosleep() in mingw57target_link_libraries(select winpthread)58endif()596061