Rev 15134 | Rev 18497 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
15134 | 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(LCMS2_LIBS ${_lcmsCflags}) |
||
20 | |||
21 | FIND_PATH(LCMS2_INCLUDE_DIR lcms2.h |
||
22 | /usr/include |
||
23 | /usr/local/include |
||
24 | PATH_SUFFIXES lcms2 |
||
25 | ) |
||
26 | |||
27 | FIND_LIBRARY(LCMS2_LIBRARY_RELEASE |
||
28 | NAMES ${LCMS2_NAMES_RELEASE} ${LCMS2_NAMES} lcms2 liblcms2 lcms2dll |
||
29 | PATHS /usr/lib /usr/local/lib |
||
30 | ) |
||
31 | |||
32 | FIND_LIBRARY(LCMS2_LIBRARY_DEBUG |
||
33 | NAMES ${LCMS2_NAMES_DEBUG} lcms2d liblcms2d lcms2dlld |
||
34 | PATHS /usr/lib /usr/local/lib |
||
35 | ) |
||
36 | |||
37 | INCLUDE(LibraryDebugAndRelease) |
||
38 | SET_LIBRARY_FROM_DEBUG_AND_RELEASE(LCMS2) |
||
39 | |||
40 | MESSAGE("LCMS 2 ReleaseLibrary: ${LCMS2_LIBRARY_RELEASE}") |
||
41 | MESSAGE("LCMS 2 Debug Library: ${LCMS2_LIBRARY_DEBUG}") |
||
42 | MESSAGE("LCMS 2 Library: ${LCMS2_LIBRARY}") |
||
43 | |||
44 | IF (LCMS2_LIBRARY AND LCMS2_INCLUDE_DIR) |
||
45 | SET( LCMS2_FOUND 1 ) |
||
15143 | fschmid | 46 | SET( LCMS_LIBRARIES ${LCMS2_LIBRARY} ) |
15134 | cbradney | 47 | ELSE (LCMS2_LIBRARY AND LCMS2_INCLUDE_DIR) |
48 | SET( LCMS2_FOUND 0 ) |
||
49 | ENDIF (LCMS2_LIBRARY AND LCMS2_INCLUDE_DIR) |
||
50 | |||
51 | SET(LCMS2_FIND_QUIETLY 1) |
||
52 | |||
53 | IF (LCMS2_FOUND) |
||
54 | IF (NOT LCMS2_FIND_QUIETLY) |
||
55 | MESSAGE(STATUS "Found LittleCMS 2: ${LCMS2_LIBRARY}") |
||
56 | ENDIF (NOT LCMS2_FIND_QUIETLY) |
||
57 | ELSE (LCMS2_FOUND) |
||
58 | IF (LCMS2_FIND_REQUIRED) |
||
59 | MESSAGE(FATAL_ERROR "Could not find LittleCMS") |
||
60 | ENDIF (LCMS2_FIND_REQUIRED) |
||
61 | ENDIF (LCMS2_FOUND) |