File: FindLensFun.cmake

package info (click to toggle)
darktable 1.4.2-1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 19,940 kB
  • ctags: 22,185
  • sloc: ansic: 181,925; cpp: 32,612; lisp: 4,681; xml: 4,046; sh: 2,002; makefile: 395; python: 315; perl: 114; awk: 110; asm: 46
file content (37 lines) | stat: -rw-r--r-- 1,300 bytes parent folder | download | duplicates (3)
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
# - Find the native lensfun includes and library
#
# This module defines
#  LENSFUN_INCLUDE_DIR, where to find lensfun.h, etc.
#  LENSFUN_LIBRARIES, the libraries to link against to use lensfun.
#  LENSFUN_FOUND, If false, do not try to use lensfun.
# also defined, but not for general use are
#  LENSFUN_LIBRARY, where to find the lensfun library.


#=============================================================================
# Copyright 2010 henrik andersson
#=============================================================================

SET(LENSFUN_FIND_REQUIRED ${LensFun_FIND_REQUIRED})

find_path(LENSFUN_INCLUDE_DIR lensfun.h 
  HINTS 
  /usr/include/lensfun
  /include/lensfun
  ENV LENSFUN_INCLUDE_DIR)
mark_as_advanced(LENSFUN_INCLUDE_DIR)

set(LENSFUN_NAMES ${LENSFUN_NAMES} lensfun liblensfun)
find_library(LENSFUN_LIBRARY NAMES ${LENSFUN_NAMES} 
	HINTS ENV LENSFUN_LIB_DIR)
mark_as_advanced(LENSFUN_LIBRARY)

# handle the QUIETLY and REQUIRED arguments and set LENSFUN_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LENSFUN DEFAULT_MSG LENSFUN_LIBRARY LENSFUN_INCLUDE_DIR)

IF(LENSFUN_FOUND)
  SET(LensFun_LIBRARIES ${LENSFUN_LIBRARY})
  SET(LensFun_INCLUDE_DIRS ${LENSFUN_INCLUDE_DIR})
ENDIF(LENSFUN_FOUND)