Mercurial > trustbridge > nss-cmake-static
comparison CMakeLists.txt @ 0:1e5118fa0cb1
This is NSS with a Cmake Buildsyste
To compile a static NSS library for Windows we've used the
Chromium-NSS fork and added a Cmake buildsystem to compile
it statically for Windows. See README.chromium for chromium
changes and README.trustbridge for our modifications.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 28 Jul 2014 10:47:06 +0200 |
parents | |
children | 247cffdc9b89 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1e5118fa0cb1 |
---|---|
1 # Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik | |
2 # Software engineering by Intevation GmbH | |
3 # | |
4 # This file is Free Software under the GNU GPL (v>=2) | |
5 # and comes with ABSOLUTELY NO WARRANTY! | |
6 # See LICENSE.txt for details. | |
7 | |
8 include_directories(${CMAKE_CURRENT_BINARY_DIR}) | |
9 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/sqlite) | |
10 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nspr/pr/include) | |
11 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nspr/pr/include/private) | |
12 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nspr/lib/ds) | |
13 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nspr/lib/libc/include) | |
14 | |
15 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/base) | |
16 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/certdb) | |
17 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/certhigh) | |
18 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/cryptohi) | |
19 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/dev) | |
20 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/freebl) | |
21 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/freebl/ecl) | |
22 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/freebl/mpi) | |
23 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/nss) | |
24 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/pk11wrap) | |
25 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/pkcs7) | |
26 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/pki) | |
27 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/smime) | |
28 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/softoken) | |
29 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/ssl) | |
30 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/util) | |
31 | |
32 set (COMMON_DEFINITIONS "-DWIN32 -D_WIN32_WINNT=0x602 -D_NSPR_BUILD -DFORCE_PR_LOG -DXP_PC") | |
33 set (COMMON_DEFINITIONS "${COMMON_DEFINITIONS} -DWIN95 -D_PR_GLOBAL_THREADS_ONLY -D_X86_ -UWINNT") | |
34 set (COMMON_DEFINITIONS "${COMMON_DEFINITIONS} -DNSPR_STATIC") | |
35 | |
36 set (NSS_DEFINITIONS "${COMMON_DEFINITIONS} -DMP_API_COMPATIBLE -DNSS_DISABLE_DBM -DNSS_STATIC") | |
37 set (NSS_DEFINITIONS "${NSS_DEFINITIONS} -DNSS_USE_STATIC_LIBS -DRIJNDAEL_INCLUDE_TABLES -DSHLIB_VERSION=\\\"3\\\"" ) | |
38 set (NSS_DEFINITIONS "${NSS_DEFINITIONS} -DSOFTOKEN_SHLIB_VERSION=\\\"3\\\" -DUSE_UTIL_DIRECTLY") | |
39 set (NSS_DEFINITIONS "${NSS_DEFINITIONS} -DNSS_DISABLE_ROOT_CERTS -DNSS_DISABLE_LIBPKIX -DSHLIB_SUFFIX=\\\"dll\\\"") | |
40 set (NSS_DEFINITIONS "${NSS_DEFINITIONS} -DSHLIB_PREFIX=\\\"\\\" -DSOFTOKEN_LIB_NAME=\\\"softokn3.dll\\\"") | |
41 set (NSS_DEFINITIONS "${NSS_DEFINITIONS} -DNSS_X86_OR_X64 -DNSS_X86 -D_X86_") | |
42 set (NSS_DEFINITIONS "${NSS_DEFINITIONS} -DMP_NO_MP_WORD -DMP_USE_UINT_DIGIT") | |
43 #set (NSS_DEFINITIONS "${NSS_DEFINITIONS} -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE -DMP_ASSEMBLY_DIV_2DX1D ") | |
44 set (NSS_DEFINITIONS "${NSS_DEFINITIONS} -DNO_NSPR_10_SUPPORT -DXP_WIN32 -DXP_WIN") | |
45 | |
46 set (NSPR_DEFINITIONS "${COMMON_DEFINITIONS} -D_NSPR_BUILD") | |
47 | |
48 set(nss_static_src | |
49 nss/lib/base/arena.c | |
50 nss/lib/base/error.c | |
51 nss/lib/base/errorval.c | |
52 nss/lib/base/hash.c | |
53 nss/lib/base/hashops.c | |
54 nss/lib/base/item.c | |
55 nss/lib/base/libc.c | |
56 nss/lib/base/list.c | |
57 nss/lib/base/nssutf8.c | |
58 nss/lib/base/tracker.c | |
59 nss/lib/certdb/alg1485.c | |
60 nss/lib/certdb/certdb.c | |
61 nss/lib/certdb/certv3.c | |
62 nss/lib/certdb/certxutl.c | |
63 nss/lib/certdb/crl.c | |
64 nss/lib/certdb/genname.c | |
65 nss/lib/certdb/polcyxtn.c | |
66 nss/lib/certdb/secname.c | |
67 nss/lib/certdb/stanpcertdb.c | |
68 nss/lib/certdb/xauthkid.c | |
69 nss/lib/certdb/xbsconst.c | |
70 nss/lib/certdb/xconst.c | |
71 nss/lib/certhigh/certhigh.c | |
72 nss/lib/certhigh/certhtml.c | |
73 nss/lib/certhigh/certreq.c | |
74 nss/lib/certhigh/certvfy.c | |
75 nss/lib/certhigh/crlv2.c | |
76 nss/lib/certhigh/ocsp.c | |
77 nss/lib/certhigh/ocspsig.c | |
78 nss/lib/certhigh/xcrldist.c | |
79 nss/lib/cryptohi/dsautil.c | |
80 nss/lib/cryptohi/sechash.c | |
81 nss/lib/cryptohi/seckey.c | |
82 nss/lib/cryptohi/secsign.c | |
83 nss/lib/cryptohi/secvfy.c | |
84 nss/lib/dev/ckhelper.c | |
85 nss/lib/dev/devslot.c | |
86 nss/lib/dev/devtoken.c | |
87 nss/lib/dev/devutil.c | |
88 nss/lib/freebl/aeskeywrap.c | |
89 nss/lib/freebl/alg2268.c | |
90 nss/lib/freebl/alghmac.c | |
91 nss/lib/freebl/arcfive.c | |
92 nss/lib/freebl/arcfour.c | |
93 nss/lib/freebl/camellia.c | |
94 nss/lib/freebl/chacha20/chacha20.c | |
95 nss/lib/freebl/chacha20poly1305.c | |
96 nss/lib/freebl/ctr.c | |
97 nss/lib/freebl/cts.c | |
98 nss/lib/freebl/des.c | |
99 nss/lib/freebl/desblapi.c | |
100 nss/lib/freebl/dh.c | |
101 nss/lib/freebl/drbg.c | |
102 nss/lib/freebl/dsa.c | |
103 nss/lib/freebl/ec.c | |
104 nss/lib/freebl/ecdecode.c | |
105 nss/lib/freebl/ecl/ecl.c | |
106 nss/lib/freebl/ecl/ecl_curve.c | |
107 nss/lib/freebl/ecl/ecl_gf.c | |
108 nss/lib/freebl/ecl/ecl_mult.c | |
109 nss/lib/freebl/ecl/ecp_256.c | |
110 nss/lib/freebl/ecl/ecp_256_32.c | |
111 nss/lib/freebl/ecl/ecp_384.c | |
112 nss/lib/freebl/ecl/ecp_521.c | |
113 nss/lib/freebl/ecl/ecp_aff.c | |
114 nss/lib/freebl/ecl/ecp_jac.c | |
115 nss/lib/freebl/ecl/ecp_jm.c | |
116 nss/lib/freebl/ecl/ecp_mont.c | |
117 nss/lib/freebl/ecl/ec_naf.c | |
118 nss/lib/freebl/gcm.c | |
119 nss/lib/freebl/hmacct.c | |
120 nss/lib/freebl/jpake.c | |
121 nss/lib/freebl/md2.c | |
122 nss/lib/freebl/md5.c | |
123 nss/lib/freebl/mpi/mpcpucache.c | |
124 nss/lib/freebl/mpi/mpi.c | |
125 # nss/lib/freebl/mpi/mpi_x86_asm.c | |
126 nss/lib/freebl/mpi/mplogic.c | |
127 nss/lib/freebl/mpi/mpmontg.c | |
128 nss/lib/freebl/mpi/mpprime.c | |
129 nss/lib/freebl/mpi/mp_gf2m.c | |
130 nss/lib/freebl/poly1305/poly1305.c | |
131 nss/lib/freebl/pqg.c | |
132 nss/lib/freebl/rawhash.c | |
133 nss/lib/freebl/rijndael.c | |
134 nss/lib/freebl/rsa.c | |
135 nss/lib/freebl/rsapkcs.c | |
136 nss/lib/freebl/seed.c | |
137 nss/lib/freebl/sha512.c | |
138 nss/lib/freebl/sha_fast.c | |
139 nss/lib/freebl/shvfy.c | |
140 nss/lib/freebl/sysrand.c | |
141 nss/lib/freebl/tlsprfalg.c | |
142 nss/lib/nss/nssinit.c | |
143 nss/lib/nss/utilwrap.c | |
144 nss/lib/pk11wrap/dev3hack.c | |
145 nss/lib/pk11wrap/pk11akey.c | |
146 nss/lib/pk11wrap/pk11auth.c | |
147 nss/lib/pk11wrap/pk11cert.c | |
148 nss/lib/pk11wrap/pk11cxt.c | |
149 nss/lib/pk11wrap/pk11err.c | |
150 nss/lib/pk11wrap/pk11kea.c | |
151 nss/lib/pk11wrap/pk11list.c | |
152 nss/lib/pk11wrap/pk11load.c | |
153 nss/lib/pk11wrap/pk11mech.c | |
154 nss/lib/pk11wrap/pk11merge.c | |
155 nss/lib/pk11wrap/pk11nobj.c | |
156 nss/lib/pk11wrap/pk11obj.c | |
157 nss/lib/pk11wrap/pk11pars.c | |
158 nss/lib/pk11wrap/pk11pbe.c | |
159 nss/lib/pk11wrap/pk11pk12.c | |
160 nss/lib/pk11wrap/pk11pqg.c | |
161 nss/lib/pk11wrap/pk11sdr.c | |
162 nss/lib/pk11wrap/pk11skey.c | |
163 nss/lib/pk11wrap/pk11slot.c | |
164 nss/lib/pk11wrap/pk11util.c | |
165 nss/lib/pkcs7/certread.c | |
166 nss/lib/pkcs7/p7common.c | |
167 nss/lib/pkcs7/p7create.c | |
168 nss/lib/pkcs7/p7decode.c | |
169 nss/lib/pkcs7/p7encode.c | |
170 nss/lib/pkcs7/p7local.c | |
171 nss/lib/pkcs7/secmime.c | |
172 nss/lib/pki/asymmkey.c | |
173 nss/lib/pki/certdecode.c | |
174 nss/lib/pki/certificate.c | |
175 nss/lib/pki/cryptocontext.c | |
176 nss/lib/pki/pki3hack.c | |
177 nss/lib/pki/pkibase.c | |
178 nss/lib/pki/pkistore.c | |
179 nss/lib/pki/symmkey.c | |
180 nss/lib/pki/tdcache.c | |
181 nss/lib/pki/trustdomain.c | |
182 nss/lib/softoken/fipsaudt.c | |
183 nss/lib/softoken/fipstest.c | |
184 nss/lib/softoken/fipstokn.c | |
185 nss/lib/softoken/jpakesftk.c | |
186 nss/lib/softoken/lgglue.c | |
187 nss/lib/softoken/lowkey.c | |
188 nss/lib/softoken/lowpbe.c | |
189 nss/lib/softoken/padbuf.c | |
190 nss/lib/softoken/pkcs11.c | |
191 nss/lib/softoken/pkcs11c.c | |
192 nss/lib/softoken/pkcs11u.c | |
193 nss/lib/softoken/sdb.c | |
194 nss/lib/softoken/sftkdb.c | |
195 nss/lib/softoken/sftkhmac.c | |
196 nss/lib/softoken/sftkpars.c | |
197 nss/lib/softoken/sftkpwd.c | |
198 nss/lib/softoken/softkver.c | |
199 nss/lib/softoken/tlsprf.c | |
200 nss/lib/util/derdec.c | |
201 nss/lib/util/derenc.c | |
202 nss/lib/util/dersubr.c | |
203 nss/lib/util/dertime.c | |
204 nss/lib/util/errstrs.c | |
205 nss/lib/util/nssb64d.c | |
206 nss/lib/util/nssb64e.c | |
207 nss/lib/util/nssilock.c | |
208 nss/lib/util/nssrwlk.c | |
209 nss/lib/util/oidstring.c | |
210 nss/lib/util/portreg.c | |
211 nss/lib/util/quickder.c | |
212 nss/lib/util/secalgid.c | |
213 nss/lib/util/secasn1d.c | |
214 nss/lib/util/secasn1e.c | |
215 nss/lib/util/secasn1u.c | |
216 nss/lib/util/secdig.c | |
217 nss/lib/util/secitem.c | |
218 nss/lib/util/secoid.c | |
219 nss/lib/util/secport.c | |
220 nss/lib/util/sectime.c | |
221 nss/lib/util/templates.c | |
222 nss/lib/util/utf8.c | |
223 nss/lib/util/utilmod.c | |
224 nss/lib/util/utilpars.c | |
225 nss/lib/nss/nssver.c | |
226 nss/lib/freebl/win_rand.c | |
227 sqlite/sqlite3.c | |
228 ) | |
229 | |
230 set(nspr_static_src | |
231 nspr/pr/src/io/prlayer.c | |
232 nspr/pr/src/io/prlog.c | |
233 nspr/pr/src/io/prmapopt.c | |
234 nspr/pr/src/io/prmmap.c | |
235 nspr/pr/src/io/prmwait.c | |
236 nspr/pr/src/io/prpolevt.c | |
237 nspr/pr/src/io/prprf.c | |
238 nspr/pr/src/io/prscanf.c | |
239 nspr/pr/src/io/prsocket.c | |
240 nspr/pr/src/io/prstdio.c | |
241 nspr/pr/src/io/priometh.c | |
242 nspr/pr/src/io/prfile.c | |
243 nspr/pr/src/io/prfdcach.c | |
244 nspr/pr/src/io/prsocket.c | |
245 nspr/pr/src/io/pripv6.c | |
246 nspr/pr/src/io/prio.c | |
247 nspr/pr/src/linking/prlink.c | |
248 nspr/pr/src/malloc/prmalloc.c | |
249 nspr/pr/src/malloc/prmem.c | |
250 nspr/pr/src/md/prosdep.c | |
251 nspr/pr/src/md/windows/ntgc.c | |
252 nspr/pr/src/md/windows/ntinrval.c | |
253 nspr/pr/src/md/windows/ntmisc.c | |
254 nspr/pr/src/md/windows/ntsec.c | |
255 nspr/pr/src/md/windows/ntsem.c | |
256 nspr/pr/src/md/windows/w32ipcsem.c | |
257 nspr/pr/src/md/windows/w32poll.c | |
258 nspr/pr/src/md/windows/w32rng.c | |
259 nspr/pr/src/md/windows/w32shm.c | |
260 nspr/pr/src/md/windows/w95cv.c | |
261 nspr/pr/src/md/windows/w95dllmain.c | |
262 nspr/pr/src/md/windows/w95io.c | |
263 nspr/pr/src/md/windows/w95sock.c | |
264 nspr/pr/src/md/windows/w95thred.c | |
265 nspr/pr/src/md/windows/win32_errors.c | |
266 nspr/pr/src/memory/prseg.c | |
267 nspr/pr/src/memory/prshm.c | |
268 nspr/pr/src/memory/prshma.c | |
269 nspr/pr/src/misc/pralarm.c | |
270 nspr/pr/src/misc/pratom.c | |
271 nspr/pr/src/misc/praton.c | |
272 nspr/pr/src/misc/prcountr.c | |
273 nspr/pr/src/misc/prdtoa.c | |
274 nspr/pr/src/misc/prenv.c | |
275 nspr/pr/src/misc/prerr.c | |
276 nspr/pr/src/misc/prerror.c | |
277 nspr/pr/src/misc/prerrortable.c | |
278 nspr/pr/src/misc/prinit.c | |
279 nspr/pr/src/misc/prinrval.c | |
280 nspr/pr/src/misc/pripc.c | |
281 nspr/pr/src/misc/pripcsem.c | |
282 nspr/pr/src/misc/prlog2.c | |
283 nspr/pr/src/misc/prlong.c | |
284 nspr/pr/src/misc/prnetdb.c | |
285 nspr/pr/src/misc/prolock.c | |
286 nspr/pr/src/misc/prrng.c | |
287 nspr/pr/src/misc/prsystem.c | |
288 nspr/pr/src/misc/prthinfo.c | |
289 nspr/pr/src/misc/prtime.c | |
290 nspr/pr/src/misc/prtpool.c | |
291 nspr/pr/src/misc/prtrace.c | |
292 nspr/pr/src/threads/combined/prucpu.c | |
293 nspr/pr/src/threads/combined/prucv.c | |
294 nspr/pr/src/threads/combined/prulock.c | |
295 nspr/pr/src/threads/combined/prustack.c | |
296 nspr/pr/src/threads/combined/pruthr.c | |
297 nspr/pr/src/threads/prcmon.c | |
298 nspr/pr/src/threads/prcthr.c | |
299 nspr/pr/src/threads/prdump.c | |
300 nspr/pr/src/threads/prmon.c | |
301 nspr/pr/src/threads/prrwlock.c | |
302 nspr/pr/src/threads/prsem.c | |
303 nspr/pr/src/threads/prtpd.c | |
304 nspr/lib/ds/plhash.c | |
305 nspr/lib/ds/plarena.c | |
306 nspr/lib/libc/src/strcase.c | |
307 nspr/lib/libc/src/strcat.c | |
308 nspr/lib/libc/src/strcpy.c | |
309 nspr/lib/libc/src/strlen.c | |
310 nspr/lib/libc/src/strpbrk.c | |
311 nspr/lib/libc/src/base64.c | |
312 ) | |
313 | |
314 add_library(nss_static STATIC ${nss_static_src}) | |
315 add_library(nspr_static STATIC ${nspr_static_src}) | |
316 | |
317 set_target_properties(nspr_static PROPERTIES COMPILE_FLAGS ${NSPR_DEFINITIONS}) | |
318 set_target_properties(nss_static PROPERTIES COMPILE_FLAGS ${NSS_DEFINITIONS}) |