Warning, /graphics/okular/cmake/modules/FindCHM.cmake is written in an unsupported language. File is not indexed.
0001 # - Try to find the chm library
0002 # Once done this will define
0003 #
0004 # CHM_FOUND - system has the chm library
0005 # CHM_INCLUDE_DIR - the chm include directory
0006 # CHM_LIBRARY - Link this to use the chm library
0007 #
0008 # SPDX-FileCopyrightText: 2006 Pino Toscano <toscano.pino@tiscali.it>
0009 # SPDX-License-Identifier: BSD-3-Clause
0010
0011 if (CHM_LIBRARY AND CHM_INCLUDE_DIR)
0012 # in cache already
0013 set(CHM_FOUND TRUE)
0014 else (CHM_LIBRARY AND CHM_INCLUDE_DIR)
0015
0016 find_path(CHM_INCLUDE_DIR chm_lib.h
0017 ${GNUWIN32_DIR}/include
0018 )
0019
0020 find_library(CHM_LIBRARY NAMES chm
0021 PATHS
0022 ${GNUWIN32_DIR}/lib
0023 )
0024
0025 include(FindPackageHandleStandardArgs)
0026 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CHM DEFAULT_MSG CHM_INCLUDE_DIR CHM_LIBRARY )
0027 # ensure that they are cached
0028 set(CHM_INCLUDE_DIR ${CHM_INCLUDE_DIR} CACHE INTERNAL "The chmlib include path")
0029 set(CHM_LIBRARY ${CHM_LIBRARY} CACHE INTERNAL "The libraries needed to use chmlib")
0030
0031 endif (CHM_LIBRARY AND CHM_INCLUDE_DIR)