blob: 17ec3f64c18e79a45e13e45737c5465adfbd45de [file] [log] [blame]
Philippe Antoine72333522018-05-03 16:40:24 +02001set(libs
2 mbedtls
3)
4
5if(USE_PKCS11_HELPER_LIBRARY)
6 set(libs ${libs} pkcs11-helper)
7endif(USE_PKCS11_HELPER_LIBRARY)
8
9if(ENABLE_ZLIB_SUPPORT)
10 set(libs ${libs} ${ZLIB_LIBRARIES})
11endif(ENABLE_ZLIB_SUPPORT)
12
Philippe Antoine81496272019-06-04 14:47:58 +020013find_library(FUZZINGENGINE_LIB FuzzingEngine)
Philippe Antoine72333522018-05-03 16:40:24 +020014
Philippe Antoine81496272019-06-04 14:47:58 +020015if(NOT FUZZINGENGINE_LIB)
16 add_executable(fuzz_x509csr fuzz_x509csr.c onefile.c)
17 target_link_libraries(fuzz_x509csr ${libs})
Philippe Antoine72333522018-05-03 16:40:24 +020018
Philippe Antoine81496272019-06-04 14:47:58 +020019 add_executable(fuzz_x509crl fuzz_x509crl.c onefile.c)
20 target_link_libraries(fuzz_x509crl ${libs})
Philippe Antoine72333522018-05-03 16:40:24 +020021
Philippe Antoine81496272019-06-04 14:47:58 +020022 add_executable(fuzz_x509crt fuzz_x509crt.c onefile.c)
23 target_link_libraries(fuzz_x509crt ${libs})
Philippe Antoine72333522018-05-03 16:40:24 +020024
Philippe Antoine81496272019-06-04 14:47:58 +020025 add_executable(fuzz_privkey fuzz_privkey.c onefile.c)
26 target_link_libraries(fuzz_privkey ${libs})
Philippe Antoine72333522018-05-03 16:40:24 +020027
Philippe Antoine81496272019-06-04 14:47:58 +020028 add_executable(fuzz_pubkey fuzz_pubkey.c onefile.c)
29 target_link_libraries(fuzz_pubkey ${libs})
Philippe Antoine72333522018-05-03 16:40:24 +020030
Philippe Antoine81496272019-06-04 14:47:58 +020031 add_executable(fuzz_client fuzz_client.c common.c onefile.c)
32 target_link_libraries(fuzz_client ${libs})
Philippe Antoine72333522018-05-03 16:40:24 +020033
Philippe Antoine81496272019-06-04 14:47:58 +020034 add_executable(fuzz_server fuzz_server.c common.c onefile.c)
35 target_link_libraries(fuzz_server ${libs})
Philippe Antoine72333522018-05-03 16:40:24 +020036
Philippe Antoine81496272019-06-04 14:47:58 +020037 add_executable(fuzz_dtlsclient fuzz_dtlsclient.c common.c onefile.c)
38 target_link_libraries(fuzz_dtlsclient ${libs})
39
40 add_executable(fuzz_dtlsserver fuzz_dtlsserver.c common.c onefile.c)
41 target_link_libraries(fuzz_dtlsserver ${libs})
42else()
43 project(fuzz CXX)
44
45 add_executable(fuzz_x509csr fuzz_x509csr.c)
46 target_link_libraries(fuzz_x509csr ${libs} FuzzingEngine)
47 SET_TARGET_PROPERTIES(fuzz_x509csr PROPERTIES LINKER_LANGUAGE CXX)
48
49 add_executable(fuzz_x509crl fuzz_x509crl.c)
50 target_link_libraries(fuzz_x509crl ${libs} FuzzingEngine)
51 SET_TARGET_PROPERTIES(fuzz_x509crl PROPERTIES LINKER_LANGUAGE CXX)
52
53 add_executable(fuzz_x509crt fuzz_x509crt.c)
54 target_link_libraries(fuzz_x509crt ${libs} FuzzingEngine)
55 SET_TARGET_PROPERTIES(fuzz_x509crt PROPERTIES LINKER_LANGUAGE CXX)
56
57 add_executable(fuzz_privkey fuzz_privkey.c)
58 target_link_libraries(fuzz_privkey ${libs} FuzzingEngine)
59 SET_TARGET_PROPERTIES(fuzz_privkey PROPERTIES LINKER_LANGUAGE CXX)
60
61 add_executable(fuzz_pubkey fuzz_pubkey.c)
62 target_link_libraries(fuzz_pubkey ${libs} FuzzingEngine)
63 SET_TARGET_PROPERTIES(fuzz_pubkey PROPERTIES LINKER_LANGUAGE CXX)
64
65 add_executable(fuzz_client fuzz_client.c common.c)
66 target_link_libraries(fuzz_client ${libs} FuzzingEngine)
67 SET_TARGET_PROPERTIES(fuzz_client PROPERTIES LINKER_LANGUAGE CXX)
68
69 add_executable(fuzz_server fuzz_server.c common.c)
70 target_link_libraries(fuzz_server ${libs} FuzzingEngine)
71 SET_TARGET_PROPERTIES(fuzz_server PROPERTIES LINKER_LANGUAGE CXX)
72
73 add_executable(fuzz_dtlsclient fuzz_dtlsclient.c common.c)
74 target_link_libraries(fuzz_dtlsclient ${libs} FuzzingEngine)
75 SET_TARGET_PROPERTIES(fuzz_dtlsclient PROPERTIES LINKER_LANGUAGE CXX)
76
77 add_executable(fuzz_dtlsserver fuzz_dtlsserver.c common.c)
78 target_link_libraries(fuzz_dtlsserver ${libs} FuzzingEngine)
79 SET_TARGET_PROPERTIES(fuzz_dtlsserver PROPERTIES LINKER_LANGUAGE CXX)
80endif()