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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
#
# Find the native LCMS includes and library
#
# This module defines
# LCMS_INCLUDE_DIR, where to find art*.h etc
# LCMS_LIBRARY, the libraries
# LCMS_FOUND, If false, do not try to use LCMS.
# LIBLCMS_LIBS, link information
# LIBLCMS_CFLAGS, cflags for include information
# include(UsePkgConfig)
# use pkg-config to get the directories and then use these values
# in the find_path() and find_library() calls
# PKGCONFIG(lcms _lcmsIncDir _lcmsLinkDir _lcmsLinkFlags _lcmsCflags)
# set(LCMS2_LIBS ${_lcmsCflags})
find_path(LCMS2_INCLUDE_DIR lcms2.h
PATH_SUFFIXES lcms2
)
find_library(LCMS2_LIBRARY_RELEASE
NAMES ${LCMS2_NAMES_RELEASE} ${LCMS2_NAMES} lcms2 liblcms2 lcms2dll
PATHS /usr/lib /usr/local/lib
)
find_library(LCMS2_LIBRARY_DEBUG
NAMES ${LCMS2_NAMES_DEBUG} lcms2d liblcms2d lcms2dlld
PATHS /usr/lib /usr/local/lib
)
include(LibraryDebugAndRelease)
SET_LIBRARY_FROM_DEBUG_AND_RELEASE(LCMS2)
message("LCMS 2 ReleaseLibrary: ${LCMS2_LIBRARY_RELEASE}")
message("LCMS 2 Debug Library: ${LCMS2_LIBRARY_DEBUG}")
message("LCMS 2 Library: ${LCMS2_LIBRARY}")
if (LCMS2_LIBRARY AND LCMS2_INCLUDE_DIR)
set( LCMS2_FOUND ON )
set( LCMS2_LIBRARIES ${LCMS2_LIBRARY} )
else (LCMS2_LIBRARY AND LCMS2_INCLUDE_DIR)
set( LCMS2_FOUND OFF )
endif (LCMS2_LIBRARY AND LCMS2_INCLUDE_DIR)
set(LCMS2_FIND_QUIETLY ON)
if (LCMS2_FOUND)
if (NOT LCMS2_FIND_QUIETLY)
message(STATUS "Found LittleCMS 2: ${LCMS2_LIBRARY}")
endif (NOT LCMS2_FIND_QUIETLY)
else (LCMS2_FOUND)
if (LCMS2_FIND_REQUIRED)
message(FATAL_ERROR "Could not find LittleCMS")
endif (LCMS2_FIND_REQUIRED)
endif (LCMS2_FOUND)
|