Warning, /education/kstars/cmake/modules/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 # SPDX-FileCopyrightText: 2006 Jasem Mutlaq <mutlaqja@ikarustech.com> 0009 # 0010 # Based on FindLibfacile: 0011 # SPDX-FileCopyrightText: Carsten Niehaus, <cniehaus@gmx.de> 0012 # 0013 # SPDX-License-Identifier: BSD-3-Clause 0014 0015 if (CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARIES) 0016 0017 # in cache already 0018 set(CFITSIO_FOUND TRUE) 0019 message(STATUS "Found CFITSIO: ${CFITSIO_LIBRARIES}") 0020 0021 0022 else (CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARIES) 0023 0024 if (NOT WIN32) 0025 find_package(PkgConfig) 0026 if (PKG_CONFIG_FOUND) 0027 pkg_check_modules(PC_CFITSIO cfitsio) 0028 endif (PKG_CONFIG_FOUND) 0029 endif (NOT WIN32) 0030 0031 if(ANDROID) 0032 find_path(CFITSIO_INCLUDE_DIR fitsio.h 0033 ${BUILD_KSTARSLITE_DIR}/include 0034 NO_DEFAULT_PATH 0035 ) 0036 else(ANDROID) 0037 find_path(CFITSIO_INCLUDE_DIR fitsio.h 0038 ${PC_CFITSIO_INCLUDE_DIRS} 0039 ${_obIncDir} 0040 ${GNUWIN32_DIR}/include 0041 ) 0042 endif(ANDROID) 0043 0044 find_library(CFITSIO_LIBRARIES NAMES cfitsio libcfitsio 0045 PATHS 0046 if(ANDROID) 0047 ${BUILD_KSTARSLITE_DIR}/android_libs/${ANDROID_ARCHITECTURE} 0048 else(ANDROID) 0049 ${PC_CFITSIO_LIBRARY_DIRS} 0050 ${_obIncDir} 0051 ${GNUWIN32_DIR}/include 0052 endif(ANDROID) 0053 ) 0054 0055 if(CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARIES) 0056 set(CFITSIO_FOUND TRUE) 0057 else (CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARIES) 0058 set(CFITSIO_FOUND FALSE) 0059 endif(CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARIES) 0060 0061 if (CFITSIO_FOUND) 0062 if (NOT CFitsio_FIND_QUIETLY) 0063 message(STATUS "Found CFITSIO: ${CFITSIO_LIBRARIES}") 0064 endif (NOT CFitsio_FIND_QUIETLY) 0065 else (CFITSIO_FOUND) 0066 if (CFitsio_FIND_REQUIRED) 0067 message(FATAL_ERROR "CFITSIO not found. Please install libcfitsio-dev and try again.") 0068 endif (CFitsio_FIND_REQUIRED) 0069 endif (CFITSIO_FOUND) 0070 0071 mark_as_advanced(CFITSIO_INCLUDE_DIR CFITSIO_LIBRARIES) 0072 0073 endif (CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARIES)