Source

gd-libgd / cmake / modules / FindLIQ.cmake

The branch 'cmake' does not exist.
# Find libimagequant includes and library
# 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
"${PROJECT_SOURCE_DIR}/libimagequant"
"${PROJECT_SOURCE_DIR}/pngquant/lib"
/usr/local/include
/usr/include
)

FIND_LIBRARY(LIQ_LIBRARY
  NAMES libimagequant imagequant
  PATHS "${PROJECT_SOURCE_DIR}/libimagequant" "${PROJECT_SOURCE_DIR}/pngquant/lib" /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_H 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)