Debian Codegraph @

podofo/cmake/modules/FindLCMS2.cmake

raw
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 if (LCMS2_INCLUDE_DIR)
13 # Already in cache, be silent
14 set(LCMS2_FIND_QUIETLY TRUE)
15 endif ()
16
17 find_path(LCMS2_INCLUDE_DIR lcms2.h)
18
19 set(LCMS2_LIBRARY_NAMES_RELEASE ${LCMS2_LIBRARY_NAMES_RELEASE} ${LCMS2_LIBRARY_NAMES} lcms2 liblcms2)
20 find_library(LCMS2_LIBRARY_RELEASE NAMES ${LCMS2_LIBRARY_NAMES_RELEASE})
21
22 # Find a debug library if one exists and use that for debug builds.
23 # This really only does anything for win32, but does no harm on other
24 # platforms.
25 set(LCMS2_LIBRARY_NAMES_DEBUG ${LCMS2_LIBRARY_NAMES_DEBUG} lcms2d liblcms2d)
26 find_library(LCMS2_LIBRARY_DEBUG NAMES ${LCMS2_LIBRARY_NAMES_DEBUG})
27
28 include(LibraryDebugAndRelease)
29 set_library_from_debug_and_release(LCMS2)
30
31 # handle the QUIETLY and REQUIRED arguments and set LCMS2_FOUND to TRUE if
32 # all listed variables are TRUE
33 include(FindPackageHandleStandardArgs)
34 find_package_handle_standard_args(LCMS2 DEFAULT_MSG LCMS2_LIBRARY LCMS2_INCLUDE_DIR)
35
36 if(LCMS2_FOUND)
37 set(LCMS2_LIBRARIES ${LCMS2_LIBRARY})
38 else()
39 set(LCMS2_LIBRARIES)
40 endif()
41
42 mark_as_advanced(LCMS2_LIBRARY LCMS2_INCLUDE_DIR)