1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#.rst:
# Findlibraw
# -------
#
# Try to find libraw on a Unix system.
#
# This will define the following variables:
#
# ``libraw_FOUND``
# True if (the requested version of) libraw is available
# ``libraw_VERSION``
# The version of libraw
# ``libraw_LIBRARIES``
# This should be passed to target_compile_options() if the target is not
# used for linking
# ``libraw_INCLUDE_DIRS``
# This should be passed to target_include_directories() if the target is not
# used for linking
# ``libraw_DEFINITIONS``
# This should be passed to target_compile_options() if the target is not
# used for linking
find_package(PkgConfig QUIET)
pkg_check_modules(PKG_libraw QUIET libraw)
set(libraw_VERSION ${PKG_libraw_VERSION})
set(libraw_DEFINITIONS ${PKG_libraw_CFLAGS_OTHER})
find_path(libraw_INCLUDE_DIR
NAMES libraw/libraw.h
HINTS ${PKG_libraw_INCLUDE_DIRS}
)
find_library(libraw_LIBRARY
NAMES raw
HINTS ${PKG_libraw_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(libraw
FOUND_VAR libraw_FOUND
REQUIRED_VARS libraw_LIBRARY
libraw_INCLUDE_DIR
VERSION_VAR libraw_VERSION
)
set(libraw_INCLUDE_DIRS ${libraw_INCLUDE_DIR})
set(libraw_LIBRARIES ${libraw_LIBRARY})
mark_as_advanced(libraw_INCLUDE_DIR)
mark_as_advanced(libraw_LIBRARY)
|