FindLCMS.cmake 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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. find_path(LCMS_INCLUDE_DIR lcms.h PATHS /usr/include /usr/local/include /opt/include /opt/local/include)
  14. set(LCMS_NAMES ${LCMS_NAMES} lcms liblcms liblcms_static)
  15. find_library(LCMS_LIBRARY NAMES ${LCMS_NAMES} )
  16. mark_as_advanced(LCMS_INCLUDE_DIR LCMS_LIBRARY)
  17. # handle the QUIETLY and REQUIRED arguments and set LCMS_FOUND to TRUE if
  18. # all listed variables are TRUE
  19. include(FindPackageHandleStandardArgs)
  20. FIND_PACKAGE_HANDLE_STANDARD_ARGS(LCMS DEFAULT_MSG LCMS_LIBRARY LCMS_INCLUDE_DIR)
  21. if(LCMS_FOUND)
  22. set( LCMS_INCLUDE_DIRS ${LCMS_INCLUDE_DIR})
  23. set( LCMS_LIBRARIES ${LCMS_LIBRARY} )
  24. endif()