| 1 |
# - Try to find QHY Library |
| 2 |
# Once done this will define |
| 3 |
# |
| 4 |
# QHY_FOUND - system has QHY |
| 5 |
# QHY_INCLUDE_DIR - the QHY include directory |
| 6 |
# QHY_LIBRARIES - Link these to use QHY |
| 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 (QHY_INCLUDE_DIR AND QHY_LIBRARIES) |
| 12 |
|
| 13 |
# in cache already |
| 14 |
set(QHY_FOUND TRUE) |
| 15 |
message(STATUS "Found libqhyccd: ${QHY_LIBRARIES}") |
| 16 |
|
| 17 |
else (QHY_INCLUDE_DIR AND QHY_LIBRARIES) |
| 18 |
|
| 19 |
find_path(QHY_INCLUDE_DIR qhyccd.h |
| 20 |
PATH_SUFFIXES libqhy |
| 21 |
${_obIncDir} |
| 22 |
${GNUWIN32_DIR}/include |
| 23 |
) |
| 24 |
|
| 25 |
find_library(QHY_LIBRARIES NAMES qhyccd |
| 26 |
PATHS |
| 27 |
${_obLinkDir} |
| 28 |
${GNUWIN32_DIR}/lib |
| 29 |
) |
| 30 |
|
| 31 |
if(QHY_INCLUDE_DIR AND QHY_LIBRARIES) |
| 32 |
set(QHY_FOUND TRUE) |
| 33 |
else (QHY_INCLUDE_DIR AND QHY_LIBRARIES) |
| 34 |
set(QHY_FOUND FALSE) |
| 35 |
endif(QHY_INCLUDE_DIR AND QHY_LIBRARIES) |
| 36 |
|
| 37 |
|
| 38 |
if (QHY_FOUND) |
| 39 |
if (NOT QHY_FIND_QUIETLY) |
| 40 |
message(STATUS "Found QHY: ${QHY_LIBRARIES}") |
| 41 |
endif (NOT QHY_FIND_QUIETLY) |
| 42 |
else (QHY_FOUND) |
| 43 |
if (QHY_FIND_REQUIRED) |
| 44 |
message(FATAL_ERROR "QHY not found. Please install libqhy http://www.indilib.org") |
| 45 |
endif (QHY_FIND_REQUIRED) |
| 46 |
endif (QHY_FOUND) |
| 47 |
|
| 48 |
mark_as_advanced(QHY_INCLUDE_DIR QHY_LIBRARIES) |
| 49 |
|
| 50 |
endif (QHY_INCLUDE_DIR AND QHY_LIBRARIES) |