annotate cmake/FindNSS.cmake @ 307:2fd69803d219

Complete InstRemove NSS test
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 03 Apr 2014 16:35:21 +0200
parents 689b94dd89a9
children fe86c45755d8
rev   line source
224
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
1 # - 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
2
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
3 include(FindPkgConfig)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
4 # 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
5 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
6
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
7 if (NOT NSS_FOUND)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
8 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
9 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
10
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
11 foreach(include ${NSS_INCLUDES})
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 find_path(NSS_${include}_INCLUDE ${include}
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
14 HINTS ${NSS_INCLUDEDIR})
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 if(NSS_${include}_INCLUDE)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
17 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
18 else(NSS_${include}_INCLUDE)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
19 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
20 return()
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
21 endif(NSS_${include}_INCLUDE)
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 endforeach(include)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
24
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
25 foreach(lib ${NSS_LIBS})
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
26
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
27 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
28 HINTS ${NSS_LIBDIR})
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 if(NSS_${lib}_LIBRARIE)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
31 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
32 else(NSS_${lib}_LIBRARIE)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
33 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
34 return()
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
35 endif(NSS_${lib}_LIBRARIE)
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 endforeach(lib)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
38
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
39 include(FindPackageHandleStandardArgs)
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
40
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
41 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
42 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
43 )
689b94dd89a9 Wrote FindNSS to build against nss without pkg-config support (Windows).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
44 endif (NOT NSS_FOUND)

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