1 # - Try to find the DjVuLibre library
2 # Once done this will define
4 # DJVULIBRE_FOUND - system has the DjVuLibre library
5 # DJVULIBRE_INCLUDE_DIR - the DjVuLibre include directory
6 # DJVULIBRE_LIBRARY - Link this to use the DjVuLibre library
8 if (DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY)
11 set(DJVULIBRE_FOUND TRUE)
13 else (DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY)
15 find_package(PkgConfig)
17 pkg_check_modules(PC_DJVULIBRE ddjvuapi)
20 find_path(DJVULIBRE_INCLUDE_DIR libdjvu/ddjvuapi.h
22 ${PC_DJVULIBRE_INCLUDEDIR}
23 ${PC_DJVULIBRE_INCLUDE_DIRS}
24 ${GNUWIN32_DIR}/include
27 find_library(DJVULIBRE_LIBRARY NAMES djvulibre
29 ${PC_DJVULIBRE_LIBDIR}
30 ${PC_DJVULIBRE_LIBRARY_DIRS}
34 include(FindPackageHandleStandardArgs)
35 FIND_PACKAGE_HANDLE_STANDARD_ARGS(DjVuLibre DEFAULT_MSG DJVULIBRE_INCLUDE_DIR DJVULIBRE_LIBRARY )
37 mark_as_advanced(DJVULIBRE_INCLUDE_DIR DJVULIBRE_LIBRARY)
39 endif (DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY)