aboutsummaryrefslogtreecommitdiff
path: root/modules/FindFAM.cmake
blob: 0479bc8fa9110408d2e143a3dadf8040aea3574b (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
# - Try to find the FAM directory notification library
# Once done this will define
#
#  FAM_FOUND - system has FAM
#  FAM_INCLUDE_DIR - the FAM include directory
#  FAM_LIBRARIES - The libraries needed to use FAM

FIND_PATH(FAM_INCLUDE_DIR fam.h
   /usr/include
   /usr/local/include
)

FIND_LIBRARY(FAM_LIBRARIES NAMES fam
   PATHS
   /usr/lib
   /usr/local/lib
)


IF(FAM_INCLUDE_DIR AND FAM_LIBRARIES)
   SET(FAM_FOUND TRUE)
ENDIF(FAM_INCLUDE_DIR AND FAM_LIBRARIES)


IF(FAM_FOUND)
   IF(NOT FAM_FIND_QUIETLY)
      MESSAGE(STATUS "Found fam: ${FAM_LIBRARIES}")
   ENDIF(NOT FAM_FIND_QUIETLY)
ELSE(FAM_FOUND)
   IF(FAM_FIND_REQUIRED)
      MESSAGE(FATAL_ERROR "Could not find fam library")
   ENDIF(FAM_FIND_REQUIRED)
ENDIF(FAM_FOUND)

MARK_AS_ADVANCED(FAM_INCLUDE_DIR FAM_LIBRARIES)