blob: 5f27e88409c9012b55c826b9d386f53215304bbf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# Copyright (c) 2018 Yubico AB. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
list(APPEND COMPAT_SOURCES
../openbsd-compat/explicit_bzero.c
../openbsd-compat/strlcpy.c
../openbsd-compat/strlcat.c
)
if(WIN32)
list(APPEND COMPAT_SOURCES
../openbsd-compat/bsd-getline.c
../openbsd-compat/explicit_bzero_win32.c
../openbsd-compat/getopt_long.c
../openbsd-compat/posix_win.c
../openbsd-compat/readpassphrase_win32.c
)
else()
list(APPEND COMPAT_SOURCES ../openbsd-compat/readpassphrase.c)
endif()
add_executable(fido2-cred
fido2-cred.c
cred_make.c
cred_verify.c
base64.c
util.c
${COMPAT_SOURCES}
)
add_executable(fido2-assert
fido2-assert.c
assert_get.c
assert_verify.c
base64.c
util.c
${COMPAT_SOURCES}
)
add_executable(fido2-token
fido2-token.c
base64.c
bio.c
credman.c
pin.c
token.c
util.c
${COMPAT_SOURCES}
)
add_library(sk-libfido2 MODULE sk-libfido2.c)
set_target_properties(sk-libfido2 PROPERTIES
COMPILE_FLAGS "-DSK_STANDALONE -DWITH_OPENSSL"
OUTPUT_NAME sk-libfido2
)
target_link_libraries(fido2-cred ${CRYPTO_LIBRARIES} fido2_shared)
target_link_libraries(fido2-assert ${CRYPTO_LIBRARIES} fido2_shared)
target_link_libraries(fido2-token ${CRYPTO_LIBRARIES} fido2_shared)
target_link_libraries(sk-libfido2 ${CRYPTO_LIBRARIES} fido2_shared)
install(TARGETS fido2-cred fido2-assert fido2-token
DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS sk-libfido2 DESTINATION ${CMAKE_INSTALL_LIBDIR})
|