1 # - Try to find the chm library
2 # Once done this will define
4 # CHM_FOUND - system has the chm library
5 # CHM_INCLUDE_DIR - the chm include directory
6 # CHM_LIBRARY - Link this to use the chm library
8 # Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it>
10 # Redistribution and use is allowed according to the terms of the BSD license.
11 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
13 if (CHM_LIBRARY AND CHM_INCLUDE_DIR)
16 else (CHM_LIBRARY AND CHM_INCLUDE_DIR)
18 find_path(CHM_INCLUDE_DIR chm_lib.h
19 ${GNUWIN32_DIR}/include
22 find_library(CHM_LIBRARY NAMES chm
27 include(FindPackageHandleStandardArgs)
28 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CHM DEFAULT_MSG CHM_INCLUDE_DIR CHM_LIBRARY )
29 # ensure that they are cached
30 set(CHM_INCLUDE_DIR ${CHM_INCLUDE_DIR} CACHE INTERNAL "The chmlib include path")
31 set(CHM_LIBRARY ${CHM_LIBRARY} CACHE INTERNAL "The libraries needed to use chmlib")
33 endif (CHM_LIBRARY AND CHM_INCLUDE_DIR)