Warning, /graphics/gwenview/cmake/FindCFitsio.cmake is written in an unsupported language. File is not indexed.
0001 # - Try to find CFITSIO 0002 # Once done this will define 0003 # 0004 # CFITSIO_FOUND - system has CFITSIO 0005 # CFITSIO_INCLUDE_DIR - the CFITSIO include directory 0006 # CFITSIO_LIBRARIES - Link these to use CFITSIO 0007 0008 # Copyright (c) 2006, Jasem Mutlaq <mutlaqja@ikarustech.com> 0009 # Based on FindLibfacile by Carsten Niehaus, <cniehaus@gmx.de> 0010 # 0011 # Redistribution and use is allowed according to the terms of the BSD license. 0012 # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 0013 0014 if (CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARIES) 0015 0016 # in cache already 0017 set(CFITSIO_FOUND TRUE) 0018 message(STATUS "Found CFITSIO: ${CFITSIO_LIBRARIES}") 0019 0020 0021 else (CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARIES) 0022 0023 if (NOT WIN32) 0024 find_package(PkgConfig) 0025 if (PKG_CONFIG_FOUND) 0026 pkg_check_modules(PC_CFITSIO cfitsio) 0027 endif (PKG_CONFIG_FOUND) 0028 endif (NOT WIN32) 0029 0030 find_path(CFITSIO_INCLUDE_DIR fitsio.h 0031 ${PC_CFITSIO_INCLUDE_DIRS} 0032 ${_obIncDir} 0033 ${GNUWIN32_DIR}/include 0034 ) 0035 0036 find_library(CFITSIO_LIBRARIES NAMES cfitsio libcfitsio 0037 PATHS 0038 ${PC_CFITSIO_LIBRARY_DIRS} 0039 ${_obIncDir} 0040 ${GNUWIN32_DIR}/include 0041 ) 0042 0043 if(CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARIES) 0044 set(CFITSIO_FOUND TRUE) 0045 else (CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARIES) 0046 set(CFITSIO_FOUND FALSE) 0047 endif(CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARIES) 0048 0049 if (CFITSIO_FOUND) 0050 if (NOT CFitsio_FIND_QUIETLY) 0051 message(STATUS "Found CFITSIO: ${CFITSIO_LIBRARIES}") 0052 endif (NOT CFitsio_FIND_QUIETLY) 0053 else (CFITSIO_FOUND) 0054 if (CFitsio_FIND_REQUIRED) 0055 message(FATAL_ERROR "CFITSIO not found. Please install libcfitsio-dev and try again.") 0056 endif (CFitsio_FIND_REQUIRED) 0057 endif (CFITSIO_FOUND) 0058 0059 mark_as_advanced(CFITSIO_INCLUDE_DIR CFITSIO_LIBRARIES) 0060 0061 endif (CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARIES)