source: BAORadio/libindi/v1.0.1/cmake_modules/FindFLI.cmake @ 503

Last change on this file since 503 was 490, checked in by campagne, 14 years ago

import libindi (JEC)

File size: 1.4 KB
Line 
1# - Try to find Finger Lakes Instruments Library
2# Once done this will define
3#
4#  FLI_FOUND - system has FLI
5#  FLI_INCLUDE_DIR - the FLI include directory
6#  FLI_LIBRARIES - Link these to use FLI
7
8# Copyright (c) 2008, Jasem Mutlaq <mutlaqja@ikarustech.com>
9# Based on FindLibfacile by Carsten Niehaus, <cniehaus@gmx.de>
10#
11# Redistribution and use is allowed according to the terms of the BSD license.
12# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
13
14if (FLI_INCLUDE_DIR AND FLI_LIBRARIES)
15
16  # in cache already
17  set(FLI_FOUND TRUE)
18  message(STATUS "Found libfli: ${FLI_LIBRARIES}")
19
20else (FLI_INCLUDE_DIR AND FLI_LIBRARIES)
21
22  find_path(FLI_INCLUDE_DIR libfli.h
23    PATH_SUFFIXES fli
24    ${_obIncDir}
25    ${GNUWIN32_DIR}/include
26  )
27
28  find_library(FLI_LIBRARIES NAMES fli
29    PATHS
30    ${_obLinkDir}
31    ${GNUWIN32_DIR}/lib
32  )
33
34  if(FLI_INCLUDE_DIR AND FLI_LIBRARIES)
35    set(FLI_FOUND TRUE)
36  else (FLI_INCLUDE_DIR AND FLI_LIBRARIES)
37    set(FLI_FOUND FALSE)
38  endif(FLI_INCLUDE_DIR AND FLI_LIBRARIES)
39
40
41  if (FLI_FOUND)
42    if (NOT FLI_FIND_QUIETLY)
43      message(STATUS "Found FLI: ${FLI_LIBRARIES}")
44    endif (NOT FLI_FIND_QUIETLY)
45  else (FLI_FOUND)
46    if (FLI_FIND_REQUIRED)
47      message(FATAL_ERROR "FLI not found. Please install libfli1-devel. http://indi.sf.net")
48    endif (FLI_FIND_REQUIRED)
49  endif (FLI_FOUND)
50
51  mark_as_advanced(FLI_INCLUDE_DIR FLI_LIBRARIES)
52 
53endif (FLI_INCLUDE_DIR AND FLI_LIBRARIES)
Note: See TracBrowser for help on using the repository browser.