svn path=/trunk/playground/graphics/cmake/modules/; revision=642498remotes/origin/KDE/4.0
parent
6c75fd3203
commit
427f632da1
2 changed files with 56 additions and 4 deletions
@ -0,0 +1,52 @@ |
|||||||
|
# - 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) |
||||||
|
|
||||||
|
include(UsePkgConfig) |
||||||
|
|
||||||
|
pkgconfig(ddjvuapi _ddjvuIncDir _ddjvuLinkDir ddjvuLinkFlags _ddjvuCflags) |
||||||
|
|
||||||
|
if(_ddjvuIncDir) |
||||||
|
find_path(DJVULIBRE_INCLUDE_DIR libdjvu/ddjvuapi.h |
||||||
|
${_ddjvuIncDir} |
||||||
|
/usr/local/include |
||||||
|
/usr/include |
||||||
|
${GNUWIN32_DIR}/include |
||||||
|
) |
||||||
|
|
||||||
|
find_library(DJVULIBRE_LIBRARY NAMES djvulibre |
||||||
|
PATHS |
||||||
|
${_ddjvuLinkDir} |
||||||
|
/usr/lib |
||||||
|
/usr/local/lib |
||||||
|
${GNUWIN32_DIR}/lib |
||||||
|
) |
||||||
|
endif(_ddjvuIncDir) |
||||||
|
|
||||||
|
if(DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY) |
||||||
|
set(DJVULIBRE_FOUND TRUE) |
||||||
|
endif(DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY) |
||||||
|
|
||||||
|
if (DJVULIBRE_FOUND) |
||||||
|
if (NOT DjVuLibre_FIND_QUIETLY) |
||||||
|
message(STATUS "Found DjVuLibre: ${DJVULIBRE_LIBRARY}") |
||||||
|
endif (NOT DjVuLibre_FIND_QUIETLY) |
||||||
|
else (DJVULIBRE_FOUND) |
||||||
|
if (DjVuLibre_FIND_REQUIRED) |
||||||
|
message(FATAL_ERROR "Could NOT find DjVuLibre") |
||||||
|
endif (DjVuLibre_FIND_REQUIRED) |
||||||
|
endif (DJVULIBRE_FOUND) |
||||||
|
|
||||||
|
mark_as_advanced(DJVULIBRE_INCLUDE_DIR DJVULIBRE_LIBRARY) |
||||||
|
|
||||||
|
endif (DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY) |
||||||
Loading…
Reference in new issue