| 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_LIBRARY - Link these to use APOGEE |
| 7 |
|
| 8 |
# Copyright (c) 2008, Jasem Mutlaq <[email protected]> |
| 9 |
# Based on FindLibfacile by Carsten Niehaus, <[email protected]> |
| 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 |
|
| 14 |
if (APOGEE_INCLUDE_DIR AND APOGEE_LIBRARY) |
| 15 |
|
| 16 |
# in cache already |
| 17 |
set(APOGEE_FOUND TRUE) |
| 18 |
message(STATUS "Found libapogee: ${APOGEE_LIBRARY}") |
| 19 |
|
| 20 |
else (APOGEE_INCLUDE_DIR AND APOGEE_LIBRARY) |
| 21 |
|
| 22 |
find_path(APOGEE_INCLUDE_DIR ApogeeCam.h |
| 23 |
PATH_SUFFIXES libapogee |
| 24 |
${_obIncDir} |
| 25 |
${GNUWIN32_DIR}/include |
| 26 |
) |
| 27 |
|
| 28 |
# Find Apogee Library |
| 29 |
find_library(APOGEE_LIBRARY NAMES apogee |
| 30 |
PATHS |
| 31 |
${_obLinkDir} |
| 32 |
${GNUWIN32_DIR}/lib |
| 33 |
) |
| 34 |
|
| 35 |
if(APOGEE_INCLUDE_DIR AND APOGEE_LIBRARY) |
| 36 |
set(APOGEE_FOUND TRUE) |
| 37 |
else (APOGEE_INCLUDE_DIR AND APOGEE_LIBRARY) |
| 38 |
set(APOGEE_FOUND FALSE) |
| 39 |
endif(APOGEE_INCLUDE_DIR AND APOGEE_LIBRARY) |
| 40 |
|
| 41 |
if (APOGEE_FOUND) |
| 42 |
if (NOT APOGEE_FIND_QUIETLY) |
| 43 |
message(STATUS "Found APOGEE: ${APOGEE_LIBRARY}") |
| 44 |
endif (NOT APOGEE_FIND_QUIETLY) |
| 45 |
else (APOGEE_FOUND) |
| 46 |
if (APOGEE_FIND_REQUIRED) |
| 47 |
message(FATAL_ERROR "libapogee not found. Cannot compile Apogee CCD Driver. Please install libapogee and try again. http://www.indilib.org") |
| 48 |
endif (APOGEE_FIND_REQUIRED) |
| 49 |
endif (APOGEE_FOUND) |
| 50 |
|
| 51 |
mark_as_advanced(APOGEE_INCLUDE_DIR APOGEE_LIBRARY) |
| 52 |
|
| 53 |
endif (APOGEE_INCLUDE_DIR AND APOGEE_LIBRARY) |