summaryrefslogtreecommitdiff
path: root/examples/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/CMakeLists.txt')
-rw-r--r--examples/CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 1203592..7228860 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -3,6 +3,7 @@
3# license that can be found in the LICENSE file. 3# license that can be found in the LICENSE file.
4 4
5list(APPEND COMPAT_SOURCES 5list(APPEND COMPAT_SOURCES
6 ../openbsd-compat/clock_gettime.c
6 ../openbsd-compat/getopt_long.c 7 ../openbsd-compat/getopt_long.c
7 ../openbsd-compat/strlcat.c 8 ../openbsd-compat/strlcat.c
8 ../openbsd-compat/strlcpy.c 9 ../openbsd-compat/strlcpy.c
@@ -15,6 +16,13 @@ endif()
15# drop -rdynamic 16# drop -rdynamic
16set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") 17set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
17 18
19# enable -Wconversion -Wsign-conversion
20if(NOT MSVC)
21 set_source_files_properties(assert.c cred.c info.c manifest.c reset.c
22 retries.c setpin.c util.c PROPERTIES COMPILE_FLAGS
23 "-Wconversion -Wsign-conversion")
24endif()
25
18# manifest 26# manifest
19add_executable(manifest manifest.c ${COMPAT_SOURCES}) 27add_executable(manifest manifest.c ${COMPAT_SOURCES})
20target_link_libraries(manifest fido2) 28target_link_libraries(manifest fido2)
@@ -42,3 +50,11 @@ target_link_libraries(setpin fido2)
42# retries 50# retries
43add_executable(retries retries.c ${COMPAT_SOURCES}) 51add_executable(retries retries.c ${COMPAT_SOURCES})
44target_link_libraries(retries fido2) 52target_link_libraries(retries fido2)
53
54# select
55add_executable(select select.c ${COMPAT_SOURCES})
56target_link_libraries(select fido2)
57if(MINGW)
58 # needed for nanosleep() in mingw
59 target_link_libraries(select winpthread)
60endif()