| 1 |
# - Find LCMS library |
| 2 |
# Find the native LCMS includes and library |
| 3 |
# Once done this will define |
| 4 |
# |
| 5 |
# LCMS_INCLUDE_DIR - Where to find lcms.h, etc. |
| 6 |
# LCMS_LIBRARIES - Libraries to link against to use LCMS. |
| 7 |
# LCMS_FOUND - If false, do not try to use LCMS. |
| 8 |
# |
| 9 |
# also defined, but not for general use are |
| 10 |
# LCMS_LIBRARY, where to find the LCMS library. |
| 11 |
|
| 12 |
#============================================================================= |
| 13 |
#============================================================================= |
| 14 |
|
| 15 |
find_path(LCMS_INCLUDE_DIR lcms.h PATHS /usr/include /usr/local/include /opt/include /opt/local/include) |
| 16 |
|
| 17 |
set(LCMS_NAMES ${LCMS_NAMES} lcms liblcms liblcms_static) |
| 18 |
|
| 19 |
find_library(LCMS_LIBRARY NAMES ${LCMS_NAMES} ) |
| 20 |
|
| 21 |
mark_as_advanced(LCMS_INCLUDE_DIR LCMS_LIBRARY) |
| 22 |
|
| 23 |
# handle the QUIETLY and REQUIRED arguments and set LCMS_FOUND to TRUE if |
| 24 |
# all listed variables are TRUE |
| 25 |
include(FindPackageHandleStandardArgs) |
| 26 |
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LCMS DEFAULT_MSG LCMS_LIBRARY LCMS_INCLUDE_DIR) |
| 27 |
|
| 28 |
if(LCMS_FOUND) |
| 29 |
set( LCMS_INCLUDE_DIRS ${LCMS_INCLUDE_DIR}) |
| 30 |
set( LCMS_LIBRARIES ${LCMS_LIBRARY} ) |
| 31 |
endif() |