Debian Codegraph @

cmake_modules/FindMICAM.cmake

raw
1 # - Try to find Moravian Instruments Camera Library
2 # Once done this will define
3 #
4 # MICAM_FOUND - system has MI
5 # MICAM_INCLUDE_DIR - the MI include directory
6 # MICAM_LIBRARIES - Link these to use MI
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 (MICAM_INCLUDE_DIR AND MICAM_LIBRARIES)
12
13 # in cache already
14 set(MICAM_FOUND TRUE)
15 message(STATUS "Found libmicam: ${MICAM_LIBRARIES}")
16
17 else (MICAM_INCLUDE_DIR AND MICAM_LIBRARIES)
18
19 find_path(MICAM_INCLUDE_DIR gxccd.h
20 PATH_SUFFIXES libmicam
21 ${_obIncDir}
22 ${GNUWIN32_DIR}/include
23 )
24
25 find_library(MICAM_LIBRARIES NAMES gxccd
26 PATHS
27 ${_obLinkDir}
28 ${GNUWIN32_DIR}/lib
29 )
30
31 if(MICAM_INCLUDE_DIR AND MICAM_LIBRARIES)
32 set(MICAM_FOUND TRUE)
33 else (MICAM_INCLUDE_DIR AND MICAM_LIBRARIES)
34 set(MICAM_FOUND FALSE)
35 endif(MICAM_INCLUDE_DIR AND MICAM_LIBRARIES)
36
37 if (MICAM_FOUND)
38 if (NOT MICAM_FIND_QUIETLY)
39 message(STATUS "Found MI Library: ${MICAM_LIBRARIES}")
40 endif (NOT MICAM_FIND_QUIETLY)
41 else (MICAM_FOUND)
42 if (MICAM_FIND_REQUIRED)
43 message(FATAL_ERROR "MI Library not found. Please install MI Library http://www.indilib.org")
44 endif (MICAM_FIND_REQUIRED)
45 endif (MICAM_FOUND)
46
47 mark_as_advanced(MICAM_INCLUDE_DIR MICAM_LIBRARIES)
48
49 endif (MICAM_INCLUDE_DIR AND MICAM_LIBRARIES)