Path: blob/main/contrib/libfido2/tools/CMakeLists.txt
39536 views
# Copyright (c) 2018-2022 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/bsd-getpagesize.c7../openbsd-compat/explicit_bzero.c8../openbsd-compat/freezero.c9../openbsd-compat/recallocarray.c10../openbsd-compat/strlcat.c11../openbsd-compat/strlcpy.c12../openbsd-compat/strsep.c13)1415if(WIN32 AND NOT CYGWIN AND NOT MSYS)16list(APPEND COMPAT_SOURCES17../openbsd-compat/bsd-getline.c18../openbsd-compat/endian_win32.c19../openbsd-compat/explicit_bzero_win32.c20../openbsd-compat/getopt_long.c21../openbsd-compat/readpassphrase_win32.c22)23if (BUILD_SHARED_LIBS)24list(APPEND COMPAT_SOURCES ../openbsd-compat/posix_win.c)25endif()26else()27list(APPEND COMPAT_SOURCES ../openbsd-compat/readpassphrase.c)28endif()2930if(NOT MSVC)31set_source_files_properties(assert_get.c assert_verify.c base64.c bio.c32config.c cred_make.c cred_verify.c credman.c fido2-assert.c33fido2-cred.c fido2-token.c pin.c token.c util.c34PROPERTIES COMPILE_FLAGS "${EXTRA_CFLAGS}")35endif()3637add_executable(fido2-cred38fido2-cred.c39cred_make.c40cred_verify.c41base64.c42util.c43${COMPAT_SOURCES}44)4546add_executable(fido2-assert47fido2-assert.c48assert_get.c49assert_verify.c50base64.c51util.c52${COMPAT_SOURCES}53)5455add_executable(fido2-token56fido2-token.c57base64.c58bio.c59config.c60credman.c61largeblob.c62pin.c63token.c64util.c65${COMPAT_SOURCES}66)6768target_link_libraries(fido2-cred ${CRYPTO_LIBRARIES} ${_FIDO2_LIBRARY})69target_link_libraries(fido2-assert ${CRYPTO_LIBRARIES} ${_FIDO2_LIBRARY})70target_link_libraries(fido2-token ${CRYPTO_LIBRARIES} ${_FIDO2_LIBRARY})7172install(TARGETS fido2-cred fido2-assert fido2-token73DESTINATION ${CMAKE_INSTALL_BINDIR})747576