aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindGEOIP.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/FindGEOIP.cmake')
-rw-r--r--cmake/modules/FindGEOIP.cmake9
1 files changed, 6 insertions, 3 deletions
diff --git a/cmake/modules/FindGEOIP.cmake b/cmake/modules/FindGEOIP.cmake
index 09a763ea23..bfd4c933f4 100644
--- a/cmake/modules/FindGEOIP.cmake
+++ b/cmake/modules/FindGEOIP.cmake
@@ -14,10 +14,13 @@ IF (GEOIP_INCLUDE_DIRS)
SET(GEOIP_FIND_QUIETLY TRUE)
ENDIF (GEOIP_INCLUDE_DIRS)
-FIND_PATH(GEOIP_INCLUDE_DIR GeoIP.h)
+INCLUDE(FindWSWinLibs)
+FindWSWinLibs("GeoIP-.*" "GEOIP_HINTS")
-SET(GEOIP_NAMES GeoIP)
-FIND_LIBRARY(GEOIP_LIBRARY NAMES ${GEOIP_NAMES} )
+FIND_PATH(GEOIP_INCLUDE_DIR GeoIP.h HINTS "${GEOIP_HINTS}/include" )
+
+SET(GEOIP_NAMES GeoIP libGeoIP-1)
+FIND_LIBRARY(GEOIP_LIBRARY NAMES ${GEOIP_NAMES} HINTS "${GEOIP_HINTS}/lib" )
# handle the QUIETLY and REQUIRED arguments and set GEOIP_FOUND to TRUE if
# all listed variables are TRUE