1# 2# Find a GEOTIFF library 3# 4# This file is used to manage using either a natively provided GEOTIFF library or the one in v3p if provided. 5# 6# 7# As per the standard scheme the following definitions are used 8# GEOTIFF_INCLUDE_DIR - where to find geotiff.h 9# GEOTIFF_LIBRARIES - the set of libraries to include to use GEOTIFF. 10# GEOTIFF_FOUND - TRUE, if available somewhere on the system. 11 12# Additionally 13# VXL_USING_NATIVE_GEOTIFF - True if we are using a GEOTIFF library provided outside vxl (or v3p) 14 15if ( VXL_USE_GEOTIFF ) 16 17 if( NOT GEOTIFF_FOUND ) 18 19 # If this FORCE variable is unset or is FALSE, try to find a native library. 20 if( NOT VXL_FORCE_V3P_GEOTIFF ) 21 include( ${MODULE_PATH}/NewCMake/FindGEOTIFF.cmake ) 22 if( GEOTIFF_FOUND ) 23 set(VXL_USING_NATIVE_GEOTIFF "YES") 24 endif() 25 endif() 26 27 # 28 # At some point, in a "release" version, it is possible that someone 29 # will not have the v3p geotiff library, so make sure the headers 30 # exist. 31 # 32 if( NOT GEOTIFF_FOUND ) 33 if(EXISTS ${VXL_ROOT_SOURCE_DIR}/v3p/geotiff/geotiff.h) 34 set( GEOTIFF_FOUND "YES" ) 35 set( GEOTIFF_INCLUDE_DIR ${VXL_ROOT_SOURCE_DIR}/v3p/geotiff ) 36 set( GEOTIFF_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_DIR}/include/vxl/v3p/geotiff ) 37 set( GEOTIFF_LIBRARIES geotiff ) 38 endif() 39 endif() 40 41 endif() 42 43endif() 44