2007-03-14 15:12:10 +00:00
|
|
|
# - Try to find the DjVuLibre library
|
|
|
|
# Once done this will define
|
|
|
|
#
|
|
|
|
# DJVULIBRE_FOUND - system has the DjVuLibre library
|
|
|
|
# DJVULIBRE_INCLUDE_DIR - the DjVuLibre include directory
|
|
|
|
# DJVULIBRE_LIBRARY - Link this to use the DjVuLibre library
|
|
|
|
|
|
|
|
if (DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY)
|
|
|
|
|
|
|
|
# in cache already
|
|
|
|
set(DJVULIBRE_FOUND TRUE)
|
|
|
|
|
|
|
|
else (DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY)
|
2007-06-13 20:20:44 +00:00
|
|
|
IF (NOT WIN32)
|
2008-12-16 08:15:04 +00:00
|
|
|
find_package(PkgConfig)
|
2007-03-14 15:12:10 +00:00
|
|
|
|
2008-12-16 08:15:04 +00:00
|
|
|
pkg_check_modules(PC_DJVULIBRE ddjvuapi)
|
2007-06-13 20:20:44 +00:00
|
|
|
endif(NOT WIN32)
|
2007-03-14 15:12:10 +00:00
|
|
|
|
|
|
|
find_path(DJVULIBRE_INCLUDE_DIR libdjvu/ddjvuapi.h
|
2008-12-16 08:15:04 +00:00
|
|
|
PATHS
|
|
|
|
${PC_DJVULIBRE_INCLUDEDIR}
|
|
|
|
${PC_DJVULIBRE_INCLUDE_DIRS}
|
2007-03-14 15:12:10 +00:00
|
|
|
${GNUWIN32_DIR}/include
|
|
|
|
)
|
|
|
|
|
|
|
|
find_library(DJVULIBRE_LIBRARY NAMES djvulibre
|
|
|
|
PATHS
|
2008-12-16 08:15:04 +00:00
|
|
|
${PC_DJVULIBRE_LIBDIR}
|
|
|
|
${PC_DJVULIBRE_LIBRARY_DIRS}
|
2007-03-14 15:12:10 +00:00
|
|
|
${GNUWIN32_DIR}/lib
|
|
|
|
)
|
|
|
|
|
2007-08-21 07:26:30 +00:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DjVuLibre DEFAULT_MSG DJVULIBRE_INCLUDE_DIR DJVULIBRE_LIBRARY )
|
|
|
|
|
2007-03-14 15:12:10 +00:00
|
|
|
mark_as_advanced(DJVULIBRE_INCLUDE_DIR DJVULIBRE_LIBRARY)
|
|
|
|
|
|
|
|
endif (DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY)
|