Mercurial > trustbridge
annotate cmake/FindNSS.cmake @ 1236:33a17569812a
(issue111) Remove unecessary update tips
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 24 Sep 2014 16:56:48 +0200 |
parents | 2a1206932f53 |
children |
rev | line source |
---|---|
1160
a974b61a5cce
(issue108) Add missing license headers
Andre Heinecke <andre.heinecke@intevation.de>
parents:
345
diff
changeset
|
1 # Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik |
a974b61a5cce
(issue108) Add missing license headers
Andre Heinecke <andre.heinecke@intevation.de>
parents:
345
diff
changeset
|
2 # Software engineering by Intevation GmbH |
a974b61a5cce
(issue108) Add missing license headers
Andre Heinecke <andre.heinecke@intevation.de>
parents:
345
diff
changeset
|
3 # |
a974b61a5cce
(issue108) Add missing license headers
Andre Heinecke <andre.heinecke@intevation.de>
parents:
345
diff
changeset
|
4 # This file is Free Software under the GNU GPL (v>=2) |
a974b61a5cce
(issue108) Add missing license headers
Andre Heinecke <andre.heinecke@intevation.de>
parents:
345
diff
changeset
|
5 # and comes with ABSOLUTELY NO WARRANTY! |
a974b61a5cce
(issue108) Add missing license headers
Andre Heinecke <andre.heinecke@intevation.de>
parents:
345
diff
changeset
|
6 # See LICENSE.txt for details. |
224
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
7 # - Try to find Mozilla NSS |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
8 |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
9 include(FindPkgConfig) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
10 pkg_check_modules (NSS nss) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
11 |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
12 if (NOT NSS_FOUND) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
13 set(NSS_INCLUDES nss.h nspr.h) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
14 set(NSS_LIBS nss3 nssutil3 smime3 ssl3 plds4 plc4 nspr4) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
15 |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
16 foreach(include ${NSS_INCLUDES}) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
17 |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
18 find_path(NSS_${include}_INCLUDE ${include} |
345
fe86c45755d8
Add another hint for nss include lookup.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
224
diff
changeset
|
19 HINTS ${NSS_INCLUDEDIR} |
fe86c45755d8
Add another hint for nss include lookup.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
224
diff
changeset
|
20 ${NSS_INCLUDEDIR}/nspr) |
224
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
21 |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
22 if(NSS_${include}_INCLUDE) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
23 set(NSS_INCLUDE_DIRS ${NSS_INCLUDE_DIRS};${NSS_${include}_INCLUDE}) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
24 else(NSS_${include}_INCLUDE) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
25 message(STATUS "Could not find NSS include: ${include}") |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
26 return() |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
27 endif(NSS_${include}_INCLUDE) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
28 |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
29 endforeach(include) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
30 |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
31 foreach(lib ${NSS_LIBS}) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
32 |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
33 find_library(NSS_${lib}_LIBRARIE ${lib} |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
34 HINTS ${NSS_LIBDIR}) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
35 |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
36 if(NSS_${lib}_LIBRARIE) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
37 set(NSS_LIBRARIES ${NSS_LIBRARIES};${NSS_${lib}_LIBRARIE}) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
38 else(NSS_${lib}_LIBRARIE) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
39 message(STATUS "Could not find NSS library: ${lib}") |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
40 return() |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
41 endif(NSS_${lib}_LIBRARIE) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
42 |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
43 endforeach(lib) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
44 |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
45 include(FindPackageHandleStandardArgs) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
46 |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
47 find_package_handle_standard_args(NSS |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
48 REQUIRED_VARS NSS_INCLUDE_DIRS NSS_LIBRARIES |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
49 ) |
689b94dd89a9
Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
50 endif (NOT NSS_FOUND) |