File: FindLIQ.cmake

package info (click to toggle)
libgd2 2.3.3-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,396 kB
  • sloc: ansic: 49,708; sh: 5,660; javascript: 1,859; cpp: 1,308; makefile: 345; perl: 197; tcl: 45
file content (37 lines) | stat: -rw-r--r-- 1,017 bytes parent folder | download | duplicates (2)
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 libimagequant includes and library (and download+build if needed)
# http://pngquant.org/lib
#
# This module defines
#  LIQ_INCLUDE_DIR, where to find libimagequant.h
#  LIQ_LIBRARIES, the libraries to link against to use libimagequant.
#  LIQ_FOUND, if false, do not try to use libimagequant.

SET(LIQ_FOUND "NO")

FIND_PATH(LIQ_INCLUDE_DIR libimagequant.h
  /usr/local/include
  /usr/include
)

FIND_LIBRARY(LIQ_LIBRARY
  NAMES libimagequant imagequant
  PATHS /usr/lib64 /usr/lib /usr/local/lib
)

IF (LIQ_LIBRARY AND LIQ_INCLUDE_DIR)
    SET(LIQ_FOUND "YES")
    SET(LIQ_LIBRARIES ${LIQ_LIBRARY})
    SET(HAVE_LIBIMAGEQUANT 1)
ENDIF (LIQ_LIBRARY AND LIQ_INCLUDE_DIR)

IF (LIQ_FOUND)
  IF (NOT LIQ_FIND_QUIETLY)
    MESSAGE(STATUS "Found LIQ: ${LIQ_LIBRARY} ${LIQ_INCLUDE_DIR}")
  ENDIF (NOT LIQ_FIND_QUIETLY)
ELSE (LIQ_FOUND)
  IF (LIQ_FIND_REQUIRED)
	MESSAGE(FATAL_ERROR "Could not find LIQ library")
  ENDIF (LIQ_FIND_REQUIRED)
ENDIF (LIQ_FOUND)

MARK_AS_ADVANCED(LIQ_INCLUDE_DIR LIQ_LIBRARIES LIQ_BUILD)