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