xref: /reactos/dll/3rdparty/mbedtls/CMakeLists.txt (revision fb5d5ecd)
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    sha1.c
58    sha256.c
59    sha512.c
60    #ssl_cache.c
61    ssl_ciphersuites.c
62    ssl_cli.c
63    #ssl_cookie.c
64    #ssl_srv.c
65    #ssl_ticket.c
66    ssl_tls.c
67    #threading.c
68    timing.c
69    #version.c
70    #version_features.c
71    x509.c
72    #x509_create.c
73    #x509_crl.c
74    x509_crt.c
75    #x509_csr.c
76    #x509write_crt.c
77    #x509write_csr.c
78    #xtea.c
79    )
80
81add_library(mbedtls SHARED
82    ${SOURCE}
83    mbedtls.rc
84    ${CMAKE_CURRENT_BINARY_DIR}/mbedtls.def)
85
86set_module_type(mbedtls win32dll)
87add_importlibs(mbedtls advapi32 msvcrt kernel32 ntdll)
88
89# to use `_vsnprintf_s` looks like we have to define MINGW_HAS_SECURE_API
90# and explicitly export it from msvcrt for it to work... what on earth?!
91add_definitions(-DMINGW_HAS_SECURE_API -DCRTDLL)
92
93add_cd_file(TARGET mbedtls DESTINATION reactos/system32 FOR all)
94
95if(NOT MSVC)
96    add_target_compile_flags(mbedtls "-Wno-pointer-sign -Wno-unused-function")
97elseif(USE_CLANG_CL)
98    add_target_compile_flags(mbedtls "-Wno-tautological-constant-compare")
99endif()
100