swh:1:snp:f521c49ab17ef7db6ec70b2430e1ed203f50383f
Raw File
Tip revision: de716c0b3eb9ad038ba6ed8f97fca410542551aa authored by Wenqing Wang on 21 October 2021, 11:10:21 UTC
[Test/HT] Added a parallel computing test
Tip revision: de716c0
FindGEOTIFF.cmake
# * Try to find libgeotiff
#
# Once done, this will define
#
# * GEOTIFF_FOUND
# * GEOTIFF_INCLUDE_DIRS
# * GEOTIFF_LIBRARIES

set(_deps_libs)
set(_deps_includes)
set(_deps_check)

find_path(libgeotiff_INCLUDE_DIR geotiff.h)
find_library(libgeotiff_LIBRARY geotiff)

find_path(xtiff_INCLUDE_DIR xtiffio.h)
if(MSVC)
    find_library(xtiff_LIBRARY xtiff)
    list(APPEND _deps_libs ${xtiff_LIBRARY})
endif()

find_package(TIFF)

list(APPEND _deps_libs ${TIFF_LIBRARIES})
list(APPEND _deps_includes ${TIFF_INCLUDE_DIRS})
list(APPEND _deps_check TIFF_FOUND)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
    GEOTIFF REQUIRED_VARS libgeotiff_LIBRARY libgeotiff_INCLUDE_DIR
                          xtiff_INCLUDE_DIR ${_deps_check}
)

if(GEOTIFF_FOUND)
    set(GEOTIFF_INCLUDE_DIRS ${libgeotiff_INCLUDE_DIR} ${xtiff_INCLUDE_DIR}
                             ${_deps_includes}
    )
    set(GEOTIFF_LIBRARIES ${libgeotiff_LIBRARY} ${_deps_libs})
endif()
back to top