Warning, /graphics/kst-plot/cmake/modules/FindLibTiff.cmake is written in an unsupported language. File is not indexed.

0001 # ***************************************************************************
0002 # *                                                                         *
0003 # *   Copyright : (C) 2010 The University of Toronto                        *
0004 # *   email     : netterfield@astro.utoronto.ca                             *
0005 # *                                                                         *
0006 # *   Copyright : (C) 2010 Peter Kümmel                                     *
0007 # *   email     : syntheticpp@gmx.net                                       *
0008 # *                                                                         *
0009 # *   This program is free software; you can redistribute it and/or modify  *
0010 # *   it under the terms of the GNU General Public License as published by  *
0011 # *   the Free Software Foundation; either version 2 of the License, or     *
0012 # *   (at your option) any later version.                                   *
0013 # *                                                                         *
0014 # ***************************************************************************
0015 
0016 # copied from FindGsl.cmake
0017 
0018 if(NOT TIFF_INCLUDEDIR)
0019 
0020 if(NOT kst_cross)
0021         include(FindPkgConfig)
0022         pkg_check_modules(PKGTIFF QUIET TIFF)
0023 endif()
0024 
0025 if(NOT PKGTIFF_LIBRARIES)
0026         set(PKGTIFF_LIBRARIES tiff)
0027         if (UNIX)
0028                 set(PKGTIFF_LIBRARIES ${PKGTIFF_LIBRARIES})
0029         endif()
0030 endif()
0031 
0032 set(TIFF_INCLUDEDIR TIFF_INCLUDEDIR-NOTFOUND CACHE STRING "" FORCE)
0033 find_path(TIFF_INCLUDEDIR tiffio.h
0034         HINTS
0035         ENV TIFF_DIR
0036         PATH_SUFFIXES include
0037         PATHS ${kst_3rdparty_dir} ${PKGTIFF_INCLUDEDIR})
0038 
0039 set(TIFF_LIBRARY_LIST)
0040 if(kst_3rdparty_dir)
0041     list(APPEND PKGTIFF_LIBRARIES)
0042 endif()
0043 foreach(it ${PKGTIFF_LIBRARIES})
0044         set(lib lib-NOTFOUND CACHE STRING "" FORCE)
0045         FIND_LIBRARY(lib ${it} 
0046                 HINTS
0047                 ENV TIFF_DIR
0048                 PATH_SUFFIXES lib
0049                 PATHS ${kst_3rdparty_dir} ${PKGTIFF_LIBRARY_DIRS})
0050         list(APPEND TIFF_LIBRARY_LIST ${lib})
0051 endforeach()
0052 set(TIFF_LIBRARIES ${TIFF_LIBRARY_LIST} CACHE STRING "" FORCE)
0053 
0054 endif()
0055 
0056 
0057 if(TIFF_INCLUDEDIR AND TIFF_LIBRARIES)
0058         set(TIFF_INCLUDE_DIR ${TIFF_INCLUDEDIR} ${TIFF_INCLUDEDIR}/..)
0059         set(tiff 1)
0060         message(STATUS "Found TIFF (for 16 bit tiff grayscale images):")
0061         message(STATUS "     includes : ${TIFF_INCLUDE_DIR}")
0062         message(STATUS "     libraries: ${TIFF_LIBRARIES}")
0063 else()
0064         message(STATUS "Not found: TIFF, set TIFF_DIR")
0065 endif()
0066 
0067 message(STATUS "")
0068