FindLCMS2.cmake 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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. find_path(LCMS2_INCLUDE_DIR lcms2.h PATHS /usr/include /usr/local/include /opt/include /opt/local/include)
  14. set(LCMS2_NAMES ${LCMS2_NAMES} lcms2 liblcms2 liblcms2_static)
  15. find_library(LCMS2_LIBRARY NAMES ${LCMS2_NAMES} )
  16. mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARY)
  17. # handle the QUIETLY and REQUIRED arguments and set LCMS2_FOUND to TRUE if
  18. # all listed variables are TRUE
  19. include(FindPackageHandleStandardArgs)
  20. FIND_PACKAGE_HANDLE_STANDARD_ARGS(LCMS2 DEFAULT_MSG LCMS2_LIBRARY LCMS2_INCLUDE_DIR)
  21. if(LCMS2_FOUND)
  22. set( LCMS2_INCLUDE_DIRS ${LCMS2_INCLUDE_DIR})
  23. set( LCMS2_LIBRARIES ${LCMS2_LIBRARY} )
  24. endif()