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.
|
|
|
|
|
|
|
|
#=============================================================================
|
|
|
|
#=============================================================================
|
|
|
|
|
2012-08-30 19:14:39 +02: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
|
|
|
|
2012-08-30 19:14:39 +02:00
|
|
|
set(LCMS2_NAMES ${LCMS2_NAMES} lcms2 liblcms2 liblcms2_static)
|
2011-07-13 18:49:53 +02:00
|
|
|
|
2012-08-30 19:14:39 +02:00
|
|
|
find_library(LCMS2_LIBRARY NAMES ${LCMS2_NAMES} )
|
2011-03-21 22:51:04 +01:00
|
|
|
|
2012-08-30 19:14:39 +02:00
|
|
|
mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARY)
|
2011-07-13 18:49:53 +02:00
|
|
|
|
2012-08-30 19:20:03 +02:00
|
|
|
# handle the QUIETLY and REQUIRED arguments and set LCMS2_FOUND to TRUE if
|
2011-03-21 22:51:04 +01:00
|
|
|
# all listed variables are TRUE
|
2012-08-30 19:14:39 +02:00
|
|
|
include(FindPackageHandleStandardArgs)
|
2011-03-21 22:51:04 +01:00
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LCMS2 DEFAULT_MSG LCMS2_LIBRARY LCMS2_INCLUDE_DIR)
|
2011-07-13 18:49:53 +02:00
|
|
|
|
2012-08-30 19:14:39 +02:00
|
|
|
if(LCMS2_FOUND)
|
|
|
|
set( LCMS2_INCLUDE_DIRS ${LCMS2_INCLUDE_DIR})
|
|
|
|
set( LCMS2_LIBRARIES ${LCMS2_LIBRARY} )
|
2012-08-30 19:20:03 +02:00
|
|
|
endif()
|