File: FindLibRAW.cmake

package info (click to toggle)
luminance-hdr 2.2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 9,696 kB
  • sloc: cpp: 26,619; ansic: 1,387; xml: 53; makefile: 18
file content (28 lines) | stat: -rw-r--r-- 1,088 bytes parent folder | download
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
# - Find LibRAW library
# Find the native LibRAW includes and library
# This module defines
#  LIBRAW_INCLUDE_DIR, where to find libraw.h, etc.
#  LIBRAW_LIBRARIES, libraries to link against to use LibRAW.
#  LIBRAW_FOUND, If false, do not try to use LibRAW.
# also defined, but not for general use are
#  LIBRAW_LIBRARY, where to find the LibRAW library.

FIND_PATH(LIBRAW_INCLUDE_DIR libraw/libraw.h)

SET(LIBRAW_NAMES ${LIBRAW_NAMES} raw_r)
FIND_LIBRARY(LIBRAW_LIBRARY NAMES ${LIBRAW_NAMES} )

# handle the QUIETLY and REQUIRED arguments and set LIBRAW_FOUND to TRUE if 
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBRAW  DEFAULT_MSG  LIBRAW_LIBRARY  LIBRAW_INCLUDE_DIR)

IF(LIBRAW_FOUND)
  SET( LIBRAW_LIBRARIES ${LIBRAW_LIBRARY} )
  MESSAGE(STATUS "Found LibRAW (LIBRAW_INCLUDE_DIR = ${LIBRAW_INCLUDE_DIR})")
  MESSAGE(STATUS "Found LibRAW (LIBRAW_LIBRARIES = ${LIBRAW_LIBRARIES})")
ELSE(LIBRAW_FOUND)
  MESSAGE(FATAL_ERROR "Could not find LibRAW")
ENDIF(LIBRAW_FOUND)

MARK_AS_ADVANCED(LIBRAW_INCLUDE_DIR LIBRAW_LIBRARY)