File: FindMICAM.cmake

package info (click to toggle)
indi-bresserexos2 1.0%2B20221223130124-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,164 kB
  • sloc: cpp: 2,317; makefile: 2
file content (49 lines) | stat: -rw-r--r-- 1,399 bytes parent folder | download | duplicates (112)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# - Try to find Moravian Instruments Camera Library
# Once done this will define
#
#  MICAM_FOUND - system has MI
#  MICAM_INCLUDE_DIR - the MI include directory
#  MICAM_LIBRARIES - Link these to use MI

# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

if (MICAM_INCLUDE_DIR AND MICAM_LIBRARIES)

  # in cache already
  set(MICAM_FOUND TRUE)
  message(STATUS "Found libmicam: ${MICAM_LIBRARIES}")

else (MICAM_INCLUDE_DIR AND MICAM_LIBRARIES)

  find_path(MICAM_INCLUDE_DIR gxccd.h
    PATH_SUFFIXES libmicam
    ${_obIncDir}
    ${GNUWIN32_DIR}/include
  )

  find_library(MICAM_LIBRARIES NAMES gxccd
    PATHS
    ${_obLinkDir}
    ${GNUWIN32_DIR}/lib
  )

  if(MICAM_INCLUDE_DIR AND MICAM_LIBRARIES)
    set(MICAM_FOUND TRUE)
  else (MICAM_INCLUDE_DIR AND MICAM_LIBRARIES)
    set(MICAM_FOUND FALSE)
  endif(MICAM_INCLUDE_DIR AND MICAM_LIBRARIES)

  if (MICAM_FOUND)
    if (NOT MICAM_FIND_QUIETLY)
      message(STATUS "Found MI Library: ${MICAM_LIBRARIES}")
    endif (NOT MICAM_FIND_QUIETLY)
  else (MICAM_FOUND)
    if (MICAM_FIND_REQUIRED)
      message(FATAL_ERROR "MI Library not found. Please install MI Library http://www.indilib.org")
    endif (MICAM_FIND_REQUIRED)
  endif (MICAM_FOUND)

  mark_as_advanced(MICAM_INCLUDE_DIR MICAM_LIBRARIES)

endif (MICAM_INCLUDE_DIR AND MICAM_LIBRARIES)