Mercurial > hg > orthanc
comparison Resources/CMake/OpenSslConfiguration.cmake @ 26:6ba765ecf3db
compiling openssl
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 28 Aug 2012 15:10:02 +0200 |
parents | |
children | cfe212a513c5 |
comparison
equal
deleted
inserted
replaced
25:dd1489098265 | 26:6ba765ecf3db |
---|---|
1 if (${STATIC_BUILD}) | |
2 SET(OPENSSL_SOURCES_DIR ${CMAKE_BINARY_DIR}/openssl-1.0.1c) | |
3 DownloadPackage("http://www.openssl.org/source/openssl-1.0.1c.tar.gz" "${OPENSSL_SOURCES_DIR}" "" "") | |
4 | |
5 add_definitions( | |
6 -DOPENSSL_THREADS | |
7 -DOPENSSL_IA32_SSE2 | |
8 -DOPENSSL_NO_ASM | |
9 -DOPENSSL_NO_DYNAMIC_ENGINE | |
10 -DNO_WINDOWS_BRAINDEATH | |
11 | |
12 -DOPENSSL_NO_BF | |
13 -DOPENSSL_NO_CAMELLIA | |
14 -DOPENSSL_NO_CAST | |
15 -DOPENSSL_NO_EC | |
16 -DOPENSSL_NO_ECDH | |
17 -DOPENSSL_NO_ECDSA | |
18 -DOPENSSL_NO_EC_NISTP_64_GCC_128 | |
19 -DOPENSSL_NO_GMP | |
20 -DOPENSSL_NO_GOST | |
21 -DOPENSSL_NO_HW | |
22 -DOPENSSL_NO_JPAKE | |
23 -DOPENSSL_NO_IDEA | |
24 -DOPENSSL_NO_KRB5 | |
25 -DOPENSSL_NO_MD2 | |
26 -DOPENSSL_NO_MDC2 | |
27 -DOPENSSL_NO_MD4 | |
28 -DOPENSSL_NO_RC2 | |
29 -DOPENSSL_NO_RC4 | |
30 -DOPENSSL_NO_RC5 | |
31 -DOPENSSL_NO_RFC3779 | |
32 -DOPENSSL_NO_SCTP | |
33 -DOPENSSL_NO_STORE | |
34 -DOPENSSL_NO_SEED | |
35 -DOPENSSL_NO_WHIRLPOOL | |
36 -DOPENSSL_NO_RIPEMD | |
37 ) | |
38 | |
39 include_directories( | |
40 ${OPENSSL_SOURCES_DIR} | |
41 ${OPENSSL_SOURCES_DIR}/crypto | |
42 ${OPENSSL_SOURCES_DIR}/crypto/asn1 | |
43 ${OPENSSL_SOURCES_DIR}/crypto/modes | |
44 ${OPENSSL_SOURCES_DIR}/crypto/evp | |
45 ${OPENSSL_SOURCES_DIR}/include | |
46 ) | |
47 | |
48 set(OPENSSL_SOURCES_SUBDIRS | |
49 ${OPENSSL_SOURCES_DIR}/crypto | |
50 ${OPENSSL_SOURCES_DIR}/crypto/aes | |
51 ${OPENSSL_SOURCES_DIR}/crypto/asn1 | |
52 ${OPENSSL_SOURCES_DIR}/crypto/bio | |
53 ${OPENSSL_SOURCES_DIR}/crypto/bn | |
54 ${OPENSSL_SOURCES_DIR}/crypto/buffer | |
55 ${OPENSSL_SOURCES_DIR}/crypto/cmac | |
56 ${OPENSSL_SOURCES_DIR}/crypto/cms | |
57 ${OPENSSL_SOURCES_DIR}/crypto/comp | |
58 ${OPENSSL_SOURCES_DIR}/crypto/conf | |
59 ${OPENSSL_SOURCES_DIR}/crypto/des | |
60 ${OPENSSL_SOURCES_DIR}/crypto/dh | |
61 ${OPENSSL_SOURCES_DIR}/crypto/dsa | |
62 ${OPENSSL_SOURCES_DIR}/crypto/dso | |
63 ${OPENSSL_SOURCES_DIR}/crypto/engine | |
64 ${OPENSSL_SOURCES_DIR}/crypto/err | |
65 ${OPENSSL_SOURCES_DIR}/crypto/evp | |
66 ${OPENSSL_SOURCES_DIR}/crypto/hmac | |
67 ${OPENSSL_SOURCES_DIR}/crypto/lhash | |
68 ${OPENSSL_SOURCES_DIR}/crypto/md5 | |
69 ${OPENSSL_SOURCES_DIR}/crypto/modes | |
70 ${OPENSSL_SOURCES_DIR}/crypto/objects | |
71 ${OPENSSL_SOURCES_DIR}/crypto/ocsp | |
72 ${OPENSSL_SOURCES_DIR}/crypto/pem | |
73 ${OPENSSL_SOURCES_DIR}/crypto/pkcs12 | |
74 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7 | |
75 ${OPENSSL_SOURCES_DIR}/crypto/pqueue | |
76 ${OPENSSL_SOURCES_DIR}/crypto/rand | |
77 ${OPENSSL_SOURCES_DIR}/crypto/rsa | |
78 ${OPENSSL_SOURCES_DIR}/crypto/sha | |
79 ${OPENSSL_SOURCES_DIR}/crypto/srp | |
80 ${OPENSSL_SOURCES_DIR}/crypto/stack | |
81 ${OPENSSL_SOURCES_DIR}/crypto/ts | |
82 ${OPENSSL_SOURCES_DIR}/crypto/txt_db | |
83 ${OPENSSL_SOURCES_DIR}/crypto/ui | |
84 ${OPENSSL_SOURCES_DIR}/crypto/x509 | |
85 ${OPENSSL_SOURCES_DIR}/crypto/x509v3 | |
86 ${OPENSSL_SOURCES_DIR}/ssl | |
87 ) | |
88 | |
89 foreach(d ${OPENSSL_SOURCES_SUBDIRS}) | |
90 AUX_SOURCE_DIRECTORY(${d} OPENSSL_SOURCES) | |
91 endforeach() | |
92 | |
93 list(REMOVE_ITEM OPENSSL_SOURCES | |
94 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_nyi.c | |
95 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_unix.c | |
96 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_vms.c | |
97 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win.c | |
98 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win32.c | |
99 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_wince.c | |
100 ${OPENSSL_SOURCES_DIR}/crypto/armcap.c | |
101 ${OPENSSL_SOURCES_DIR}/crypto/bf/bfs.cpp | |
102 ${OPENSSL_SOURCES_DIR}/crypto/bio/bss_rtcp.c | |
103 ${OPENSSL_SOURCES_DIR}/crypto/bn/exp.c | |
104 ${OPENSSL_SOURCES_DIR}/crypto/conf/cnf_save.c | |
105 ${OPENSSL_SOURCES_DIR}/crypto/conf/test.c | |
106 ${OPENSSL_SOURCES_DIR}/crypto/des/des3s.cpp | |
107 ${OPENSSL_SOURCES_DIR}/crypto/des/des_opts.c | |
108 ${OPENSSL_SOURCES_DIR}/crypto/des/dess.cpp | |
109 ${OPENSSL_SOURCES_DIR}/crypto/des/read_pwd.c | |
110 ${OPENSSL_SOURCES_DIR}/crypto/des/speed.c | |
111 ${OPENSSL_SOURCES_DIR}/crypto/evp/e_dsa.c | |
112 ${OPENSSL_SOURCES_DIR}/crypto/evp/m_ripemd.c | |
113 ${OPENSSL_SOURCES_DIR}/crypto/lhash/lh_test.c | |
114 ${OPENSSL_SOURCES_DIR}/crypto/md5/md5s.cpp | |
115 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/bio_ber.c | |
116 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/pk7_enc.c | |
117 ${OPENSSL_SOURCES_DIR}/crypto/ppccap.c | |
118 ${OPENSSL_SOURCES_DIR}/crypto/s390xcap.c | |
119 ${OPENSSL_SOURCES_DIR}/crypto/sparcv9cap.c | |
120 ${OPENSSL_SOURCES_DIR}/crypto/x509v3/tabtest.c | |
121 ${OPENSSL_SOURCES_DIR}/crypto/x509v3/v3conf.c | |
122 ${OPENSSL_SOURCES_DIR}/ssl/ssl_task.c | |
123 ) | |
124 | |
125 add_library(OpenSSL STATIC ${OPENSSL_SOURCES}) | |
126 link_libraries(OpenSSL) | |
127 | |
128 else() | |
129 include(FindOpenSSL) | |
130 | |
131 if (NOT ${OPENSSL_FOUND}) | |
132 message(FATAL_ERROR "Unable to find OpenSSL") | |
133 endif() | |
134 | |
135 include_directories(${OPENSSL_INCLUDE_DIR}) | |
136 link_libraries(${OPENSSL_LIBRARIES}) | |
137 endif() |