diff options
Diffstat (limited to 'examples/CMakeLists.txt')
-rw-r--r-- | examples/CMakeLists.txt | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 0000000..957311e --- /dev/null +++ b/examples/CMakeLists.txt | |||
@@ -0,0 +1,44 @@ | |||
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/getopt_long.c | ||
7 | ../openbsd-compat/strlcat.c | ||
8 | ../openbsd-compat/strlcpy.c | ||
9 | ) | ||
10 | |||
11 | if(WIN32) | ||
12 | list(APPEND COMPAT_SOURCES ../openbsd-compat/posix_win.c) | ||
13 | endif() | ||
14 | |||
15 | # drop -rdynamic | ||
16 | set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") | ||
17 | |||
18 | # manifest | ||
19 | add_executable(manifest manifest.c ${COMPAT_SOURCES}) | ||
20 | target_link_libraries(manifest fido2) | ||
21 | |||
22 | # info | ||
23 | add_executable(info info.c ${COMPAT_SOURCES}) | ||
24 | target_link_libraries(info fido2) | ||
25 | |||
26 | # reset | ||
27 | add_executable(reset reset.c util.c ${COMPAT_SOURCES}) | ||
28 | target_link_libraries(reset fido2) | ||
29 | |||
30 | # cred | ||
31 | add_executable(cred cred.c util.c ${COMPAT_SOURCES}) | ||
32 | target_link_libraries(cred fido2) | ||
33 | |||
34 | # assert | ||
35 | add_executable(assert assert.c util.c ${COMPAT_SOURCES}) | ||
36 | target_link_libraries(assert fido2) | ||
37 | |||
38 | # setpin | ||
39 | add_executable(setpin setpin.c ${COMPAT_SOURCES}) | ||
40 | target_link_libraries(setpin fido2) | ||
41 | |||
42 | # retries | ||
43 | add_executable(retries retries.c ${COMPAT_SOURCES}) | ||
44 | target_link_libraries(retries fido2) | ||