aboutsummaryrefslogtreecommitdiff
path: root/modules/FindFAM.cmake
blob: bdfa0e0329eae26c2383f8c820fab6732cede44f (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
42
43
44
45
46
47
# - 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
#
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.


if (FAM_INCLUDE_DIR)
  # Already in cache, be silent
  set(FAM_FIND_QUIETLY TRUE)
endif (FAM_INCLUDE_DIR)

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)