Debian Codegraph @

cmake_modules/FindTOUPCAM.cmake

raw
1 # - Try to find Toupcam Camera Library
2 # Once done this will define
3 #
4 # TOUPCAM_FOUND - system has Toupcam
5 # TOUPCAM_INCLUDE_DIR - the Toupcam include directory
6 # TOUPCAM_LIBRARIES - Link these to use Toupcam
7
8 # Redistribution and use is allowed according to the terms of the BSD license.
9 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
10
11 if (TOUPCAM_INCLUDE_DIR AND TOUPCAM_LIBRARIES)
12
13 # in cache already
14 set(TOUPCAM_FOUND TRUE)
15 message(STATUS "Found libsbig: ${TOUPCAM_LIBRARIES}")
16
17 else (TOUPCAM_INCLUDE_DIR AND TOUPCAM_LIBRARIES)
18
19 find_path(TOUPCAM_INCLUDE_DIR toupcam.h
20 PATH_SUFFIXES libtoupcam
21 ${_obIncDir}
22 ${GNUWIN32_DIR}/include
23 )
24
25 find_library(TOUPCAM_LIBRARIES NAMES toupcam
26 PATHS
27 ${_obLinkDir}
28 ${GNUWIN32_DIR}/lib
29 )
30
31 if(TOUPCAM_INCLUDE_DIR AND TOUPCAM_LIBRARIES)
32 set(TOUPCAM_FOUND TRUE)
33 else (TOUPCAM_INCLUDE_DIR AND TOUPCAM_LIBRARIES)
34 set(TOUPCAM_FOUND FALSE)
35 endif(TOUPCAM_INCLUDE_DIR AND TOUPCAM_LIBRARIES)
36
37
38 if (TOUPCAM_FOUND)
39 if (NOT TOUPCAM_FIND_QUIETLY)
40 message(STATUS "Found Toupcam: ${TOUPCAM_LIBRARIES}")
41 endif (NOT TOUPCAM_FIND_QUIETLY)
42 else (TOUPCAM_FOUND)
43 if (TOUPCAM_FIND_REQUIRED)
44 message(FATAL_ERROR "Toupcam not found. Please install Toupcam Library http://www.indilib.org")
45 endif (TOUPCAM_FIND_REQUIRED)
46 endif (TOUPCAM_FOUND)
47
48 mark_as_advanced(TOUPCAM_INCLUDE_DIR TOUPCAM_LIBRARIES)
49
50 endif (TOUPCAM_INCLUDE_DIR AND TOUPCAM_LIBRARIES)