summaryrefslogtreecommitdiff
path: root/cmake/modules/FindGEOIP.cmake
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2009-09-10 07:04:54 +0000
committerJörg Mayer <jmayer@loplof.de>2009-09-10 07:04:54 +0000
commit9250a69a9976617c735679aa5383e53802e5b43e (patch)
tree99eb52cccfc2a1672730ac456218933c25d614a1 /cmake/modules/FindGEOIP.cmake
parent159904bdc49b8d3c35503d057d16bff7336767e1 (diff)
downloadwireshark-9250a69a9976617c735679aa5383e53802e5b43e.tar.gz
Update to add the last missing detection stuff.
Some of it is untested, kerberos is currently a hack. Apart from that, package detection should be complete. svn path=/trunk/; revision=29838
Diffstat (limited to 'cmake/modules/FindGEOIP.cmake')
-rw-r--r--cmake/modules/FindGEOIP.cmake32
1 files changed, 32 insertions, 0 deletions
diff --git a/cmake/modules/FindGEOIP.cmake b/cmake/modules/FindGEOIP.cmake
new file mode 100644
index 0000000000..5a84cf29fe
--- /dev/null
+++ b/cmake/modules/FindGEOIP.cmake
@@ -0,0 +1,32 @@
+# - Find GeoIP
+# Find the native GEOIP includes and library
+#
+# GEOIP_INCLUDE_DIRS - where to find GeoIP.h, etc.
+# GEOIP_LIBRARIES - List of libraries when using GeoIP.
+# GEOIP_FOUND - True if GeoIP found.
+
+
+IF (GEOIP_INCLUDE_DIRS)
+ # Already in cache, be silent
+ SET(GEOIP_FIND_QUIETLY TRUE)
+ENDIF (GEOIP_INCLUDE_DIRS)
+
+FIND_PATH(GEOIP_INCLUDE_DIR GeoIP.h)
+
+SET(GEOIP_NAMES GeoIP)
+FIND_LIBRARY(GEOIP_LIBRARY NAMES ${GEOIP_NAMES} )
+
+# handle the QUIETLY and REQUIRED arguments and set GEOIP_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GEOIP DEFAULT_MSG GEOIP_LIBRARY GEOIP_INCLUDE_DIR)
+
+IF(GEOIP_FOUND)
+ SET( GEOIP_LIBRARIES ${GEOIP_LIBRARY} )
+ SET( GEOIP_INCLUDE_DIRS ${GEOIP_INCLUDE_DIR} )
+ELSE(GEOIP_FOUND)
+ SET( GEOIP_LIBRARIES )
+ SET( GEOIP_INCLUDE_DIRS )
+ENDIF(GEOIP_FOUND)
+
+MARK_AS_ADVANCED( GEOIP_LIBRARIES GEOIP_INCLUDE_DIRS )