Philippe Antoine | 7233352 | 2018-05-03 16:40:24 +0200 | [diff] [blame] | 1 | set(libs |
| 2 | mbedtls |
| 3 | ) |
| 4 | |
| 5 | if(USE_PKCS11_HELPER_LIBRARY) |
| 6 | set(libs ${libs} pkcs11-helper) |
| 7 | endif(USE_PKCS11_HELPER_LIBRARY) |
| 8 | |
| 9 | if(ENABLE_ZLIB_SUPPORT) |
| 10 | set(libs ${libs} ${ZLIB_LIBRARIES}) |
| 11 | endif(ENABLE_ZLIB_SUPPORT) |
| 12 | |
Philippe Antoine | 8149627 | 2019-06-04 14:47:58 +0200 | [diff] [blame] | 13 | find_library(FUZZINGENGINE_LIB FuzzingEngine) |
Philippe Antoine | 7233352 | 2018-05-03 16:40:24 +0200 | [diff] [blame] | 14 | |
Philippe Antoine | 8149627 | 2019-06-04 14:47:58 +0200 | [diff] [blame] | 15 | if(NOT FUZZINGENGINE_LIB) |
| 16 | add_executable(fuzz_x509csr fuzz_x509csr.c onefile.c) |
| 17 | target_link_libraries(fuzz_x509csr ${libs}) |
Philippe Antoine | 7233352 | 2018-05-03 16:40:24 +0200 | [diff] [blame] | 18 | |
Philippe Antoine | 8149627 | 2019-06-04 14:47:58 +0200 | [diff] [blame] | 19 | add_executable(fuzz_x509crl fuzz_x509crl.c onefile.c) |
| 20 | target_link_libraries(fuzz_x509crl ${libs}) |
Philippe Antoine | 7233352 | 2018-05-03 16:40:24 +0200 | [diff] [blame] | 21 | |
Philippe Antoine | 8149627 | 2019-06-04 14:47:58 +0200 | [diff] [blame] | 22 | add_executable(fuzz_x509crt fuzz_x509crt.c onefile.c) |
| 23 | target_link_libraries(fuzz_x509crt ${libs}) |
Philippe Antoine | 7233352 | 2018-05-03 16:40:24 +0200 | [diff] [blame] | 24 | |
Philippe Antoine | 8149627 | 2019-06-04 14:47:58 +0200 | [diff] [blame] | 25 | add_executable(fuzz_privkey fuzz_privkey.c onefile.c) |
| 26 | target_link_libraries(fuzz_privkey ${libs}) |
Philippe Antoine | 7233352 | 2018-05-03 16:40:24 +0200 | [diff] [blame] | 27 | |
Philippe Antoine | 8149627 | 2019-06-04 14:47:58 +0200 | [diff] [blame] | 28 | add_executable(fuzz_pubkey fuzz_pubkey.c onefile.c) |
| 29 | target_link_libraries(fuzz_pubkey ${libs}) |
Philippe Antoine | 7233352 | 2018-05-03 16:40:24 +0200 | [diff] [blame] | 30 | |
Philippe Antoine | 8149627 | 2019-06-04 14:47:58 +0200 | [diff] [blame] | 31 | add_executable(fuzz_client fuzz_client.c common.c onefile.c) |
| 32 | target_link_libraries(fuzz_client ${libs}) |
Philippe Antoine | 7233352 | 2018-05-03 16:40:24 +0200 | [diff] [blame] | 33 | |
Philippe Antoine | 8149627 | 2019-06-04 14:47:58 +0200 | [diff] [blame] | 34 | add_executable(fuzz_server fuzz_server.c common.c onefile.c) |
| 35 | target_link_libraries(fuzz_server ${libs}) |
Philippe Antoine | 7233352 | 2018-05-03 16:40:24 +0200 | [diff] [blame] | 36 | |
Philippe Antoine | 8149627 | 2019-06-04 14:47:58 +0200 | [diff] [blame] | 37 | 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}) |
| 42 | else() |
| 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) |
| 80 | endif() |