| 1 |
# - Try to find Altair Camera Library |
| 2 |
# Once done this will define |
| 3 |
# |
| 4 |
# ALTAIRCAM_FOUND - system has Altair |
| 5 |
# ALTAIRCAM_INCLUDE_DIR - the Altair include directory |
| 6 |
# ALTAIRCAM_LIBRARIES - Link these to use Altair |
| 7 |
|
| 8 |
# Redistribution and use is allowed according to the terms of the BSD license. |
| 9 |
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
| 10 |
|
| 11 |
if (ALTAIRCAM_INCLUDE_DIR AND ALTAIRCAM_LIBRARIES) |
| 12 |
|
| 13 |
# in cache already |
| 14 |
set(ALTAIRCAM_FOUND TRUE) |
| 15 |
message(STATUS "Found libaltaircam: ${ALTAIRCAM_LIBRARIES}") |
| 16 |
|
| 17 |
else (ALTAIRCAM_INCLUDE_DIR AND ALTAIRCAM_LIBRARIES) |
| 18 |
|
| 19 |
find_path(ALTAIRCAM_INCLUDE_DIR altaircam.h |
| 20 |
PATH_SUFFIXES libaltaircam |
| 21 |
${_obIncDir} |
| 22 |
${GNUWIN32_DIR}/include |
| 23 |
) |
| 24 |
|
| 25 |
find_library(ALTAIRCAM_LIBRARIES NAMES altaircam |
| 26 |
PATHS |
| 27 |
${_obLinkDir} |
| 28 |
${GNUWIN32_DIR}/lib |
| 29 |
) |
| 30 |
|
| 31 |
if(ALTAIRCAM_INCLUDE_DIR AND ALTAIRCAM_LIBRARIES) |
| 32 |
set(ALTAIRCAM_FOUND TRUE) |
| 33 |
else (ALTAIRCAM_INCLUDE_DIR AND ALTAIRCAM_LIBRARIES) |
| 34 |
set(ALTAIRCAM_FOUND FALSE) |
| 35 |
endif(ALTAIRCAM_INCLUDE_DIR AND ALTAIRCAM_LIBRARIES) |
| 36 |
|
| 37 |
if (ALTAIRCAM_FOUND) |
| 38 |
if (NOT ALTAIRCAM_FIND_QUIETLY) |
| 39 |
message(STATUS "Found Altaircam: ${ALTAIRCAM_LIBRARIES}") |
| 40 |
endif (NOT ALTAIRCAM_FIND_QUIETLY) |
| 41 |
else (ALTAIRCAM_FOUND) |
| 42 |
if (ALTAIRCAM_FIND_REQUIRED) |
| 43 |
message(FATAL_ERROR "Altaircam not found. Please install Altaircam Library http://www.indilib.org") |
| 44 |
endif (ALTAIRCAM_FIND_REQUIRED) |
| 45 |
endif (ALTAIRCAM_FOUND) |
| 46 |
|
| 47 |
mark_as_advanced(ALTAIRCAM_INCLUDE_DIR ALTAIRCAM_LIBRARIES) |
| 48 |
|
| 49 |
endif (ALTAIRCAM_INCLUDE_DIR AND ALTAIRCAM_LIBRARIES) |