FindOpenSlide.cmake 965 Bytes
# A CMake find module for the OpenSlide microscopy file reader library.
# Once done, this module will define
#   OpenSlide_FOUND         - system has OpenSlide
#   OpenSlide_INCLUDE_DIRS  - the OpenSlide include directory
#   OpenSlide_LIBRARIES     - link to these to use OpenSlide

set(OpenSlide_ROOT $ENV{OpenSlide_ROOT})
IF(NOT OpenSlide_ROOT)
    MESSAGE("ERROR: OpenSlide_ROOT must be set!")

FIND_PATH(OpenSlide_INCLUDE_DIRS DOC "Path to OpenSlide include directory."
            NAMES openslide/openslide.h
            PATHS ${OpenSlide_ROOT}/include)

FIND_LIBRARY(OpenSlide_LIBRARIES DOC "Absolute path to OpenSlide library."
            NAMES libopenslide.lib
            PATHS ${OpenSlide_ROOT}/lib)
find_package_handle_standard_args(OpenSlide DEFAULT_MSG OpenSlide_LIBRARIES OpenSlide_INCLUDE_DIRS)

mark_as_advanced(OpenSlide_INCLUDE_DIRS OpenSlide_LIBRARIES)