[BCRYPT] Implement mbedTLS backend. Brought to you by Peter Hater. CORE-10934
[reactos.git] / reactos / dll / 3rdparty / mbedtls / CMakeLists.txt
1
2 spec2def(mbedtls.dll mbedtls.spec ADD_IMPORTLIB)
3
4 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs
5 ${REACTOS_SOURCE_DIR}/include/reactos/zlib)
6
7 list(APPEND src
8 _reactos_strsafe_wrapper.c
9 aes.c
10 aesni.c
11 arc4.c
12 asn1parse.c
13 asn1write.c
14 base64.c
15 bignum.c
16 blowfish.c
17 camellia.c
18 ccm.c
19 certs.c
20 cipher.c
21 cipher_wrap.c
22 ctr_drbg.c
23 debug.c
24 des.c
25 dhm.c
26 ecdh.c
27 ecdsa.c
28 ecp.c
29 ecp_curves.c
30 entropy.c
31 entropy_poll.c
32 error.c
33 gcm.c
34 havege.c
35 hmac_drbg.c
36 md2.c
37 md4.c
38 md5.c
39 md.c
40 md_wrap.c
41 memory_buffer_alloc.c
42 net.c
43 oid.c
44 padlock.c
45 pem.c
46 pk.c
47 pkcs11.c
48 pkcs12.c
49 pkcs5.c
50 pkparse.c
51 pk_wrap.c
52 pkwrite.c
53 platform.c
54 ripemd160.c
55 rsa.c
56 sha1.c
57 sha256.c
58 sha512.c
59 ssl_cache.c
60 ssl_ciphersuites.c
61 ssl_cli.c
62 ssl_cookie.c
63 ssl_srv.c
64 ssl_ticket.c
65 ssl_tls.c
66 threading.c
67 timing.c
68 version.c
69 version_features.c
70 x509.c
71 x509_create.c
72 x509_crl.c
73 x509_crt.c
74 x509_csr.c
75 x509write_crt.c
76 x509write_csr.c
77 xtea.c)
78
79 add_library(mbedtls SHARED
80 ${src}
81 mbedtls.rc
82 ${CMAKE_CURRENT_BINARY_DIR}/mbedtls.def)
83
84 set_module_type(mbedtls win32dll)
85 target_link_libraries(mbedtls zlib)
86 add_importlibs(mbedtls advapi32 ws2_32 msvcrt kernel32)
87
88 # to use `_vsnprintf_s` looks like we have to define MINGW_HAS_SECURE_API
89 # and explicitly export it from msvcrt for it to work... what on earth?!
90 add_definitions(-DMINGW_HAS_SECURE_API -DCRTDLL)
91
92 if(MSVC)
93 add_importlibs(mbedtls ntdll)
94 endif()
95 add_cd_file(TARGET mbedtls DESTINATION reactos/system32 FOR all)
96
97 if(NOT MSVC)
98 add_target_compile_flags(mbedtls "-Wno-pointer-sign -Wno-unused-function")
99 if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
100 add_target_compile_flags(mbedtls "-Wno-unused-but-set-variable")
101 endif()
102 endif()