diff options
author | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-09-10 07:04:54 +0000 |
---|---|---|
committer | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-09-10 07:04:54 +0000 |
commit | e43bc109b716181f62e92ea9edc9202f75b3eba3 (patch) | |
tree | 99eb52cccfc2a1672730ac456218933c25d614a1 /cmake/modules | |
parent | ddb03ac50da51191d459602a68e055f17bb17a12 (diff) |
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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29838 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'cmake/modules')
-rw-r--r-- | cmake/modules/FindCAP.cmake | 32 | ||||
-rw-r--r-- | cmake/modules/FindGEOIP.cmake | 32 | ||||
-rw-r--r-- | cmake/modules/FindKERBEROS.cmake | 38 | ||||
-rw-r--r-- | cmake/modules/FindM.cmake | 32 | ||||
-rw-r--r-- | cmake/modules/FindMATH.cmake | 32 |
5 files changed, 134 insertions, 32 deletions
diff --git a/cmake/modules/FindCAP.cmake b/cmake/modules/FindCAP.cmake new file mode 100644 index 0000000000..04e20d6df1 --- /dev/null +++ b/cmake/modules/FindCAP.cmake @@ -0,0 +1,32 @@ +# - Find capabilities +# Find the native CAP includes and library +# +# CAP_INCLUDE_DIRS - where to find cap.h, etc. +# CAP_LIBRARIES - List of libraries when using cap. +# CAP_FOUND - True if cap found. + + +IF (CAP_INCLUDE_DIRS) + # Already in cache, be silent + SET(CAP_FIND_QUIETLY TRUE) +ENDIF (CAP_INCLUDE_DIRS) + +FIND_PATH(CAP_INCLUDE_DIR cap.h) + +SET(CAP_NAMES cap) +FIND_LIBRARY(CAP_LIBRARY NAMES ${CAP_NAMES} ) + +# handle the QUIETLY and REQUIRED arguments and set CAP_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(CAP DEFAULT_MSG CAP_LIBRARY CAP_INCLUDE_DIR) + +IF(CAP_FOUND) + SET( CAP_LIBRARIES ${CAP_LIBRARY} ) + SET( CAP_INCLUDE_DIRS ${CAP_INCLUDE_DIR} ) +ELSE(CAP_FOUND) + SET( CAP_LIBRARIES ) + SET( CAP_INCLUDE_DIRS ) +ENDIF(CAP_FOUND) + +MARK_AS_ADVANCED( CAP_LIBRARIES CAP_INCLUDE_DIRS ) 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 ) diff --git a/cmake/modules/FindKERBEROS.cmake b/cmake/modules/FindKERBEROS.cmake new file mode 100644 index 0000000000..4fb8002494 --- /dev/null +++ b/cmake/modules/FindKERBEROS.cmake @@ -0,0 +1,38 @@ +# - Find kerberos +# Find the native KERBEROS includes and library +# +# KERBEROS_INCLUDE_DIRS - where to find krb5.h, etc. +# KERBEROS_LIBRARIES - List of libraries when using krb5. +# KERBEROS_FOUND - True if krb5 found. + + +IF (KERBEROS_INCLUDE_DIRS) + # Already in cache, be silent + SET(KERBEROS_FIND_QUIETLY TRUE) +ENDIF (KERBEROS_INCLUDE_DIRS) + +FIND_PATH(KERBEROS_INCLUDE_DIR krb5.h) + +SET(KERBEROS_NAMES krb5) +FIND_LIBRARY(KERBEROS_LIBRARY NAMES ${KERBEROS_NAMES} ) + +# handle the QUIETLY and REQUIRED arguments and set KERBEROS_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(KERBEROS DEFAULT_MSG KERBEROS_LIBRARY KERBEROS_INCLUDE_DIR) + +# todo +# add all kerberos libs +# autodetect HAVE_HEIMDAL_KERBEROS +# autodetect HAVE_MIT_KERBEROS +# autodetect(?) HAVE_KEYTYPE_ARCFOUR_56 + +IF(KERBEROS_FOUND) + SET( KERBEROS_LIBRARIES ${KERBEROS_LIBRARY} ) + SET( KERBEROS_INCLUDE_DIRS ${KERBEROS_INCLUDE_DIR} ) +ELSE(KERBEROS_FOUND) + SET( KERBEROS_LIBRARIES ) + SET( KERBEROS_INCLUDE_DIRS ) +ENDIF(KERBEROS_FOUND) + +MARK_AS_ADVANCED( KERBEROS_LIBRARIES KERBEROS_INCLUDE_DIRS ) diff --git a/cmake/modules/FindM.cmake b/cmake/modules/FindM.cmake new file mode 100644 index 0000000000..6f4477334f --- /dev/null +++ b/cmake/modules/FindM.cmake @@ -0,0 +1,32 @@ +# - Find math +# Find the native M includes and library +# +# M_INCLUDE_DIRS - where to find math.h, etc. +# M_LIBRARIES - List of libraries when using math. +# M_FOUND - True if math found. + + +IF (M_INCLUDE_DIRS) + # Already in cache, be silent + SET(M_FIND_QUIETLY TRUE) +ENDIF (M_INCLUDE_DIRS) + +FIND_PATH(M_INCLUDE_DIR math.h) + +SET(M_NAMES m) +FIND_LIBRARY(M_LIBRARY NAMES ${M_NAMES} ) + +# handle the QUIETLY and REQUIRED arguments and set M_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(M DEFAULT_MSG M_LIBRARY M_INCLUDE_DIR) + +IF(M_FOUND) + SET( M_LIBRARIES ${M_LIBRARY} ) + SET( M_INCLUDE_DIRS ${M_INCLUDE_DIR} ) +ELSE(M_FOUND) + SET( M_LIBRARIES ) + SET( M_INCLUDE_DIRS ) +ENDIF(M_FOUND) + +MARK_AS_ADVANCED( M_LIBRARIES M_INCLUDE_DIRS ) diff --git a/cmake/modules/FindMATH.cmake b/cmake/modules/FindMATH.cmake deleted file mode 100644 index 9a6dd07149..0000000000 --- a/cmake/modules/FindMATH.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# - Find math -# Find the native MATH includes and library -# -# MATH_INCLUDE_DIRS - where to find math.h, etc. -# MATH_LIBRARIES - List of libraries when using math. -# MATH_FOUND - True if math found. - - -IF (MATH_INCLUDE_DIRS) - # Already in cache, be silent - SET(MATH_FIND_QUIETLY TRUE) -ENDIF (MATH_INCLUDE_DIRS) - -FIND_PATH(MATH_INCLUDE_DIR math.h) - -SET(MATH_NAMES m) -FIND_LIBRARY(MATH_LIBRARY NAMES ${MATH_NAMES} ) - -# handle the QUIETLY and REQUIRED arguments and set MATH_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(MATH DEFAULT_MSG MATH_LIBRARY MATH_INCLUDE_DIR) - -IF(MATH_FOUND) - SET( MATH_LIBRARIES ${MATH_LIBRARY} ) - SET( MATH_INCLUDE_DIRS ${MATH_INCLUDE_DIR} ) -ELSE(MATH_FOUND) - SET( MATH_LIBRARIES ) - SET( MATH_INCLUDE_DIRS ) -ENDIF(MATH_FOUND) - -MARK_AS_ADVANCED( MATH_LIBRARIES MATH_INCLUDE_DIRS ) |