2011-03-21 22:51:04 +01:00
|
|
|
# - Find LCMS2 library
|
|
|
|
# Find the native LCMS2 includes and library
|
2011-07-13 18:49:53 +02:00
|
|
|
# Once done this will define
|
|
|
|
#
|
|
|
|
# LCMS2_INCLUDE_DIR - Where to find lcms2.h, etc.
|
|
|
|
# LCMS2_LIBRARIES - Libraries to link against to use LCMS2.
|
|
|
|
# LCMS2_FOUND - If false, do not try to use LCMS2.
|
2011-03-21 22:51:04 +01:00
|
|
|
#
|
2011-07-13 18:49:53 +02:00
|
|
|
# also defined, but not for general use are
|
|
|
|
# LCMS2_LIBRARY - Where to find the LCMS2 library.
|
|
|
|
|
|
|
|
#=============================================================================
|
|
|
|
#=============================================================================
|
|
|
|
|
2011-03-21 22:51:04 +01:00
|
|
|
FIND_PATH(LCMS2_INCLUDE_DIR lcms2.h PATHS /usr/include /usr/local/include /opt/include /opt/local/include)
|
2011-07-13 18:49:53 +02:00
|
|
|
|
2011-03-21 22:51:04 +01:00
|
|
|
SET(LCMS2_NAMES ${LCMS2_NAMES} lcms2 liblcms2 liblcms2_static)
|
2011-07-13 18:49:53 +02:00
|
|
|
|
2011-03-21 22:51:04 +01:00
|
|
|
FIND_LIBRARY(LCMS2_LIBRARY NAMES ${LCMS2_NAMES} )
|
|
|
|
|
2011-07-13 18:49:53 +02:00
|
|
|
MARK_AS_ADVANCED(LCMS2_INCLUDE_DIR LCMS2_LIBRARY)
|
|
|
|
|
2011-03-21 22:51:04 +01:00
|
|
|
# handle the QUIETLY and REQUIRED arguments and set LCMS2_FOUND to TRUE if
|
|
|
|
# all listed variables are TRUE
|
|
|
|
INCLUDE(FindPackageHandleStandardArgs)
|
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LCMS2 DEFAULT_MSG LCMS2_LIBRARY LCMS2_INCLUDE_DIR)
|
2011-07-13 18:49:53 +02:00
|
|
|
|
2011-03-21 22:51:04 +01:00
|
|
|
IF(LCMS2_FOUND)
|
2011-07-13 18:49:53 +02:00
|
|
|
SET( LCMS2_INCLUDE_DIRS ${LCMS2_INCLUDE_DIR})
|
2011-03-21 22:51:04 +01:00
|
|
|
SET( LCMS2_LIBRARIES ${LCMS2_LIBRARY} )
|
|
|
|
ENDIF(LCMS2_FOUND)
|