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