xref: /reactos/dll/3rdparty/mbedtls/CMakeLists.txt (revision 7eead935)
1
2include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs
3                    ${REACTOS_SOURCE_DIR}/sdk/include/reactos/zlib)
4
5spec2def(mbedtls.dll mbedtls.spec ADD_IMPORTLIB)
6
7list(APPEND SOURCE
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    #cmac.c
23    ctr_drbg.c
24    #debug.c
25    des.c
26    dhm.c
27    ecdh.c
28    ecdsa.c
29    ecp.c
30    ecp_curves.c
31    entropy.c
32    entropy_poll.c
33    #error.c
34    gcm.c
35    #havege.c
36    hmac_drbg.c
37    #md2.c
38    #md4.c
39    md5.c
40    md.c
41    md_wrap.c
42    #memory_buffer_alloc.c
43    #net_sockets.c
44    oid.c
45    padlock.c
46    #pem.c
47    pk.c
48    #pkcs11.c
49    pkcs12.c
50    pkcs5.c
51    pkparse.c
52    pk_wrap.c
53    #pkwrite.c
54    platform.c
55    ripemd160.c
56    rsa.c
57    rsa_internal.c
58    sha1.c
59    sha256.c
60    sha512.c
61    #ssl_cache.c
62    ssl_ciphersuites.c
63    ssl_cli.c
64    #ssl_cookie.c
65    #ssl_srv.c
66    #ssl_ticket.c
67    ssl_tls.c
68    #threading.c
69    timing.c
70    #version.c
71    #version_features.c
72    x509.c
73    #x509_create.c
74    #x509_crl.c
75    x509_crt.c
76    #x509_csr.c
77    #x509write_crt.c
78    #x509write_csr.c
79    #xtea.c
80    )
81
82add_library(mbedtls MODULE
83    ${SOURCE}
84    mbedtls.rc
85    ${CMAKE_CURRENT_BINARY_DIR}/mbedtls.def)
86
87set_module_type(mbedtls win32dll)
88add_importlibs(mbedtls advapi32 msvcrt kernel32 ntdll)
89
90# to use `_vsnprintf_s` looks like we have to define MINGW_HAS_SECURE_API
91# and explicitly export it from msvcrt for it to work... what on earth?!
92add_definitions(-DMINGW_HAS_SECURE_API -DCRTDLL)
93
94add_cd_file(TARGET mbedtls DESTINATION reactos/system32 FOR all)
95
96if(NOT MSVC)
97    add_target_compile_flags(mbedtls "-Wno-pointer-sign -Wno-unused-function")
98elseif(USE_CLANG_CL)
99    add_target_compile_flags(mbedtls "-Wno-tautological-constant-compare")
100endif()
101