@@ -25,25 +25,6 @@ ENDIF()
25
25
26
26
SET (WOLFSSL_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR} /wolfssl/src )
27
27
ADD_DEFINITIONS (${SSL_DEFINES} )
28
- ADD_DEFINITIONS (
29
- -DHAVE_CRL
30
- -DWOLFSSL_MYSQL_COMPATIBLE
31
- -DHAVE_ECC
32
- -DECC_TIMING_RESISTANT
33
- -DBUILDING_WOLFSSL
34
- -DHAVE_HASHDRBG
35
- -DWOLFSSL_AES_DIRECT
36
- -DWOLFSSL_SHA384
37
- -DWOLFSSL_SHA512
38
- -DWOLFSSL_SHA224
39
- -DSESSION_CERT
40
- -DKEEP_OUR_CERT
41
- -DWOLFSSL_STATIC_RSA
42
- -DWC_RSA_BLINDING
43
- -DHAVE_TLS_EXTENSIONS
44
- -DHAVE_AES_ECB
45
- -DWOLFSSL_AES_COUNTER
46
- -DNO_WOLFSSL_STUB )
47
28
48
29
SET (WOLFSSL_SOURCES
49
30
${WOLFSSL_SRCDIR} /crl.c
@@ -53,7 +34,8 @@ SET(WOLFSSL_SOURCES
53
34
${WOLFSSL_SRCDIR} /wolfio.c
54
35
${WOLFSSL_SRCDIR} /ocsp.c
55
36
${WOLFSSL_SRCDIR} /ssl.c )
56
- ADD_DEFINITIONS (-DWOLFSSL_LIB )
37
+ ADD_DEFINITIONS (-DWOLFSSL_LIB -DBUILDING_WOLFSSL )
38
+
57
39
INCLUDE_DIRECTORIES (BEFORE ${CMAKE_CURRENT_SOURCE_DIR} /wolfssl )
58
40
IF (MSVC )
59
41
# size_t to long truncation warning
@@ -116,28 +98,31 @@ IF(NOT (MSVC AND CMAKE_C_COMPILER_ID MATCHES Clang)
116
98
ENDIF ()
117
99
118
100
IF (WOLFSSL_FASTMATH )
119
- ADD_DEFINITIONS (-DUSE_FAST_MATH )
120
- # FP_MAX_BITS is set high solely to satisfy ssl_8k_key.test
121
- # WolfSSL will use more stack space with it
122
- ADD_DEFINITIONS (-DFP_MAX_BITS=16384 )
123
- SET (WOLFCRYPT_SOURCES ${WOLFCRYPT_SOURCES} ${WOLFCRYPT_SRCDIR} /tfm.c )
101
+ SET (USE_FAST_MATH 1 )
102
+ SET (TFM_TIMING_RESISTANT 1 )
103
+ # FP_MAX_BITS is set high solely to satisfy ssl_8k_key.test
104
+ # WolfSSL will use more stack space with it
105
+ SET (FP_MAX_BITS 16384 )
106
+ SET (WOLFCRYPT_SOURCES ${WOLFCRYPT_SOURCES} ${WOLFCRYPT_SRCDIR} /tfm.c )
124
107
ELSE ()
125
- SET (WOLFCRYPT_SOURCES ${WOLFCRYPT_SOURCES} ${WOLFCRYPT_SRCDIR} /integer.c )
108
+ SET (WOLFCRYPT_SOURCES ${WOLFCRYPT_SOURCES} ${WOLFCRYPT_SRCDIR} /integer.c )
126
109
ENDIF ()
127
110
128
111
IF (WOLFSSL_INTELASM )
129
- ADD_DEFINITIONS ( -DWOLFSSL_AESNI )
130
- SET ( SSL_DEFINES " ${SSL_DEFINES} -DWOLFSSL_AESNI" PARENT_SCOPE )
112
+ SET ( WOLFSSL_AESNI 1 )
113
+
131
114
LIST (APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR} /cpuid.c )
132
115
IF (MSVC )
133
116
LIST (APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR} /aes_asm.asm )
134
117
IF (CMAKE_C_COMPILER_ID MATCHES Clang )
135
118
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes" )
136
119
ELSE ()
137
- ADD_DEFINITIONS (-DHAVE_INTEL_RDSEED -DWOLFSSL_X86_64_BUILD )
120
+ SET (HAVE_INTEL_RDSEED 1 )
121
+ SET (WOLFSSL_X86_64_BUILD 1 )
138
122
ENDIF ()
139
123
ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" )
140
- ADD_DEFINITIONS (-DHAVE_INTEL_RDSEED -DUSE_INTEL_SPEEDUP )
124
+ SET (HAVE_INTEL_RDSEED 1 )
125
+ SET (USE_INTEL_SPEEDUP 1 )
141
126
LIST (APPEND WOLFCRYPT_SOURCES
142
127
${WOLFCRYPT_SRCDIR} /aes_asm.S
143
128
${WOLFCRYPT_SRCDIR} /sha512_asm.S
@@ -146,5 +131,7 @@ IF(WOLFSSL_INTELASM)
146
131
ENDIF ()
147
132
ENDIF ()
148
133
134
+ CONFIGURE_FILE (user_settings.h.in user_settings.h )
135
+ INCLUDE_DIRECTORIES (${SSL_INCLUDE_DIRS} )
149
136
ADD_CONVENIENCE_LIBRARY (wolfcrypt ${WOLFCRYPT_SOURCES} )
150
137
0 commit comments