annotate cmake/FindNSS.cmake @ 1160:a974b61a5cce

(issue108) Add missing license headers
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 18 Sep 2014 18:00:34 +0200
parents fe86c45755d8
children 2a1206932f53
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 # FIXME: maybe a minimal version would be wise...
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
11 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
12
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
13 if (NOT NSS_FOUND)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
14 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
15 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
16
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
17 foreach(include ${NSS_INCLUDES})
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
18
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
19 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
20 HINTS ${NSS_INCLUDEDIR}
fe86c45755d8 Add another hint for nss include lookup.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 224
diff changeset
21 ${NSS_INCLUDEDIR}/nspr)
224
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
22
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
23 if(NSS_${include}_INCLUDE)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
24 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
25 else(NSS_${include}_INCLUDE)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
26 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
27 return()
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
28 endif(NSS_${include}_INCLUDE)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
29
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
30 endforeach(include)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
31
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
32 foreach(lib ${NSS_LIBS})
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
33
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
34 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
35 HINTS ${NSS_LIBDIR})
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
36
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
37 if(NSS_${lib}_LIBRARIE)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
38 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
39 else(NSS_${lib}_LIBRARIE)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
40 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
41 return()
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
42 endif(NSS_${lib}_LIBRARIE)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
43
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
44 endforeach(lib)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
45
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
46 include(FindPackageHandleStandardArgs)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
47
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
48 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
49 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
50 )
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
51 endif (NOT NSS_FOUND)

http://wald.intevation.org/projects/trustbridge/