Warning, /education/kstars/cmake/modules/FindWCSLIB.cmake is written in an unsupported language. File is not indexed.
0001 # - Try to find WCSLIB 0002 # Once done this will define 0003 # 0004 # WCSLIB_FOUND - system has WCSLIB 0005 # WCSLIB_INCLUDE_DIR - the WCSLIB include directory 0006 # WCSLIB_LIBRARIES - Link these to use WCSLIB 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 (WCSLIB_INCLUDE_DIR AND WCSLIB_LIBRARIES) 0016 0017 # in cache already 0018 set(WCSLIB_FOUND TRUE) 0019 message(STATUS "Found WCSLIB: ${WCSLIB_LIBRARIES}, ${WCSLIB_INCLUDE_DIR}") 0020 0021 else (WCSLIB_INCLUDE_DIR AND WCSLIB_LIBRARIES) 0022 0023 if (NOT WIN32) 0024 find_package(PkgConfig) 0025 if (PKG_CONFIG_FOUND) 0026 pkg_check_modules(PC_WCSLIB wcslib) 0027 endif (PKG_CONFIG_FOUND) 0028 endif (NOT WIN32) 0029 0030 find_path(WCSLIB_INCLUDE_DIR wcs.h 0031 PATH_SUFFIXES wcslib 0032 ${PC_WCSLIB_INCLUDE_DIRS} 0033 ${_obIncDir} 0034 ${GNUWIN32_DIR}/include 0035 ) 0036 0037 find_library(WCSLIB_LIBRARIES NAMES wcs wcslib 0038 PATHS 0039 ${PC_WCSLIB_LIBRARY_DIRS} 0040 ${_obLinkDir} 0041 ${GNUWIN32_DIR}/lib 0042 ) 0043 0044 if(WCSLIB_INCLUDE_DIR AND WCSLIB_LIBRARIES) 0045 set(WCSLIB_FOUND TRUE) 0046 else (WCSLIB_INCLUDE_DIR AND WCSLIB_LIBRARIES) 0047 set(WCSLIB_FOUND FALSE) 0048 endif(WCSLIB_INCLUDE_DIR AND WCSLIB_LIBRARIES) 0049 0050 0051 if (WCSLIB_FOUND) 0052 if (NOT WCSLIB_FIND_QUIETLY) 0053 message(STATUS "Found WCSLIB: ${WCSLIB_LIBRARIES}, ${WCSLIB_INCLUDE_DIR}") 0054 endif (NOT WCSLIB_FIND_QUIETLY) 0055 else (WCSLIB_FOUND) 0056 if (WCSLIB_FIND_REQUIRED) 0057 message(FATAL_ERROR "WCSLIB not found. Please install wcslib and try again.") 0058 endif (WCSLIB_FIND_REQUIRED) 0059 endif (WCSLIB_FOUND) 0060 0061 mark_as_advanced(WCSLIB_INCLUDE_DIR WCSLIB_LIBRARIES) 0062 0063 endif (WCSLIB_INCLUDE_DIR AND WCSLIB_LIBRARIES)