source: BAORadio/libindi/libindi/cmake_modules/FindAPOGEE.cmake @ 642

Last change on this file since 642 was 642, checked in by frichard, 12 years ago

-Alignement des antennes
-Version 0.0.9 de libindi

File size: 1.9 KB
Line 
1# - Try to find Apogee Instruments Library
2# Once done this will define
3#
4#  APOGEE_FOUND - system has APOGEE
5#  APOGEE_INCLUDE_DIR - the APOGEE include directory
6#  APOGEE_LIBRARIES - Link these to use APOGEE
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 (APOGEE_INCLUDE_DIR AND APOGEEU_LIBRARIES AND APOGEEE_LIBRARIES)
15
16  # in cache already
17  set(APOGEE_FOUND TRUE)
18  message(STATUS "Found libapogee: ${APOGEEU_LIBRARIES}, ${APOGEEE_LIBRARIES}")
19
20else (APOGEE_INCLUDE_DIR AND APOGEEU_LIBRARIES AND APOGEEE_LIBRARIES)
21
22  find_path(APOGEE_INCLUDE_DIR libapogee.h
23    PATH_SUFFIXES libapogee
24    ${_obIncDir}
25    ${GNUWIN32_DIR}/include
26  )
27
28  # Find Apogee Alta-U Library
29  find_library(APOGEEU_LIBRARIES NAMES apogeeu
30    PATHS
31    ${_obLinkDir}
32    ${GNUWIN32_DIR}/lib
33  )
34
35  # Find Apogee Alta-U Library
36  find_library(APOGEEE_LIBRARIES NAMES apogeee
37    PATHS
38    ${_obLinkDir}
39    ${GNUWIN32_DIR}/lib
40  )
41
42  if(APOGEE_INCLUDE_DIR AND APOGEEU_LIBRARIES AND APOGEEE_LIBRARIES)
43    set(APOGEE_FOUND TRUE)
44  else (APOGEE_INCLUDE_DIR AND APOGEEU_LIBRARIES AND APOGEEE_LIBRARIES)
45    set(APOGEE_FOUND FALSE)
46  endif(APOGEE_INCLUDE_DIR AND APOGEEU_LIBRARIES AND APOGEEE_LIBRARIES)
47
48  if (APOGEE_FOUND)
49    if (NOT APOGEE_FIND_QUIETLY)
50      message(STATUS "Found APOGEE: ${APOGEEU_LIBRARIES}, ${APOGEEE_LIBRARIES}")
51    endif (NOT APOGEE_FIND_QUIETLY)
52  else (APOGEE_FOUND)
53    if (APOGEE_FIND_REQUIRED)
54      message(FATAL_ERROR "libapogee not found. Cannot compile Apogee CCD Driver. Please install libapogee and try again. http://www.indilib.org")
55    endif (APOGEE_FIND_REQUIRED)
56  endif (APOGEE_FOUND) 
57
58 mark_as_advanced(APOGEE_INCLUDE_DIR APOGEEU_LIBRARIES APOGEEE_LIBRARIES)
59
60endif (APOGEE_INCLUDE_DIR AND APOGEEU_LIBRARIES AND APOGEEE_LIBRARIES)
Note: See TracBrowser for help on using the repository browser.