diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-22 07:37:14 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-22 07:37:14 -0400 |
commit | b3dd947ffd8b1b8c54313a848c203cbe3afeec94 (patch) | |
tree | 80d905af17a2e8f1d822b3f285d748100f25bcde /cmake | |
parent | c31d6e7d7f22ad8a3134ad1cc461c0f10a93c720 (diff) |
Added cmake support for mhash
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindMhash.cmake | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/cmake/FindMhash.cmake b/cmake/FindMhash.cmake new file mode 100644 index 0000000..eeeab3f --- /dev/null +++ b/cmake/FindMhash.cmake @@ -0,0 +1,40 @@ +MESSAGE(STATUS "Looking for mhash") +FIND_PATH(MHASH_INCLUDE_PATH + NAMES + mhash.h + PATHS + /usr/include + /usr/local/include + /sw/include + /opt/local/include + NO_DEFAULT_PATH) + +FIND_LIBRARY(MHASH_LIBRARY_PATH + NAMES + mhash + PATHS + /usr/lib64 + /usr/lib + /usr/local/lib64 + /usr/local/lib + /sw/lib + /opt/local/lib + NO_DEFAULT_PATH) + +IF(MHASH_INCLUDE_PATH) + SET(MHASH_FOUND 1 CACHE STRING "Set to 1 if mhash is found, 0 otherwise") + MESSAGE(STATUS "Looking for mhash headers - found") +ELSE(MHASH_INCLUDE_PATH) + SET(MHASH_FOUND 0 CACHE STRING "Set to 1 if mhash is found, 0 otherwise") + MESSAGE(FATAL_ERROR "Looking for mhash headers - not found") +ENDIF(MHASH_INCLUDE_PATH) + +IF(MHASH_LIBRARY_PATH) + SET(MHASH_FOUND 1 CACHE STRING "Set to 1 if mhash is found, 0 otherwise") + MESSAGE(STATUS "Looking for mhash library - found") +ELSE(MHASH_LIBRARY_PATH) + SET(MHASH_FOUND 0 CACHE STRING "Set to 1 if mhash is found, 0 otherwise") + MESSAGE(FATAL_ERROR "Looking for mhash library - not found") +ENDIF(MHASH_LIBRARY_PATH) + +MARK_AS_ADVANCED(MHASH_FOUND) |