summaryrefslogtreecommitdiff
path: root/cmake/FindMhash.cmake
blob: ab088cfc1a1570da9e9f45c2026c4b995663b9b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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
		/usr/lib/arm-linux-gnueabihf/
  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)