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