From f51cf2b74de9f2112e5f01a903b693235e70adbd Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 13 Feb 2008 19:14:20 +0000 Subject: [PATCH] add a cmake module for finding the epub library svn path=/trunk/playground/graphics/okular/epub/; revision=774654 --- cmake/FindEPub.cmake | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 cmake/FindEPub.cmake diff --git a/cmake/FindEPub.cmake b/cmake/FindEPub.cmake new file mode 100644 index 000000000..9de07dd05 --- /dev/null +++ b/cmake/FindEPub.cmake @@ -0,0 +1,35 @@ +# - Find EPub +# Find the EPub library. +# +# This module defines +# EPUB_FOUND - whether the EPub library was found +# EPUB_LIBRARIES - the EPub library +# EPUB_INCLUDE_DIR - the include path of the EPub library + +# Copyright (c) 2008, Pino Toscano, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (EPUB_INCLUDE_DIR AND EPUB_LIBRARIES) + + # Already in cache + set (EPUB_FOUND TRUE) + +else (EPUB_INCLUDE_DIR AND EPUB_LIBRARIES) + + find_library (EPUB_LIBRARIES + NAMES epub + ) + + find_path (EPUB_INCLUDE_DIR + NAMES epub.h + ) + + include (FindPackageHandleStandardArgs) + find_package_handle_standard_args (EPub DEFAULT_MSG EPUB_LIBRARIES EPUB_INCLUDE_DIR) + +endif (EPUB_INCLUDE_DIR AND EPUB_LIBRARIES) + +mark_as_advanced(EPUB_INCLUDE_DIR EPUB_LIBRARIES)