Subversion Repositories Scribus

Rev

Rev 10815 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6210 cbradney 1
#
2
# Find the native LCMS includes and library
3
#
4
 
5
# This module defines
6
# LCMS_INCLUDE_DIR, where to find art*.h etc
7
# LCMS_LIBRARY, the libraries
8
# LCMS_FOUND, If false, do not try to use LCMS.
9
# LIBLCMS_LIBS, link information
10
# LIBLCMS_CFLAGS, cflags for include information
11
 
12
 
13
# INCLUDE(UsePkgConfig)
14
 
15
# use pkg-config to get the directories and then use these values
16
# in the FIND_PATH() and FIND_LIBRARY() calls
17
# PKGCONFIG(lcms _lcmsIncDir _lcmsLinkDir _lcmsLinkFlags _lcmsCflags)
18
 
19
# SET(LCMS_LIBS ${_lcmsCflags})
20
 
21
FIND_PATH(LCMS_INCLUDE_DIR lcms.h
22
/usr/include
23
/usr/local/include
24
)
25
 
10818 craig 26
FIND_LIBRARY(LCMS_LIBRARY_RELEASE
27
  NAMES ${LCMS_NAMES_RELEASE} ${LCMS_NAMES} lcms liblcms lcmsdll
6210 cbradney 28
  PATHS /usr/lib /usr/local/lib
29
)
30
 
10818 craig 31
FIND_LIBRARY(LCMS_LIBRARY_DEBUG
32
  NAMES ${LCMS_NAMES_DEBUG} lcmsd liblcmsd lcmsdlld
33
  PATHS /usr/lib /usr/local/lib
34
)
35
 
36
INCLUDE(LibraryDebugAndRelease)
37
SET_LIBRARY_FROM_DEBUG_AND_RELEASE(LCMS)
38
 
39
MESSAGE("LCMS ReleaseLibrary: ${LCMS_LIBRARY_RELEASE}")
40
MESSAGE("LCMS Debug Library: ${LCMS_LIBRARY_DEBUG}")
41
MESSAGE("LCMS Library: ${LCMS_LIBRARY}")
42
 
6210 cbradney 43
IF (LCMS_LIBRARY AND LCMS_INCLUDE_DIR)
44
  SET( LCMS_FOUND 1 )
45
  SET( LCMS_LIBRARIES ${LCMS_LIBRARY} )
46
ELSE (LCMS_LIBRARY AND LCMS_INCLUDE_DIR)
47
  SET( LCMS_FOUND 0 )
48
ENDIF (LCMS_LIBRARY AND LCMS_INCLUDE_DIR)
49
 
9679 cbradney 50
SET(LCMS_FIND_QUIETLY 1)
51
 
6210 cbradney 52
IF (LCMS_FOUND)
53
  IF (NOT LCMS_FIND_QUIETLY)
54
    MESSAGE(STATUS "Found LittleCMS: ${LCMS_LIBRARY}")
55
  ENDIF (NOT LCMS_FIND_QUIETLY)
56
ELSE (LCMS_FOUND)
57
  IF (LCMS_FIND_REQUIRED)
58
    MESSAGE(FATAL_ERROR "Could not find LittleCMS")
59
  ENDIF (LCMS_FIND_REQUIRED)
10746 craig 60
ENDIF (LCMS_FOUND)