File: FindNNCAM.cmake

package info (click to toggle)
indi-bresserexos2 1.0%2B20221223130124-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 3,136 kB
  • sloc: cpp: 2,317; makefile: 2
file content (49 lines) | stat: -rw-r--r-- 1,395 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 NNCAM Camera Library
# Once done this will define
#
#  NNCAM_FOUND - system has Levenhuk
#  NNCAM_INCLUDE_DIR - the Levenhuk include directory
#  NNCAM_LIBRARIES - Link these to use Levenhuk

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

if (NNCAM_INCLUDE_DIR AND NNCAM_LIBRARIES)

  # in cache already
  set(NNCAM_FOUND TRUE)
  message(STATUS "Found libnncam: ${NNCAM_LIBRARIES}")

else (NNCAM_INCLUDE_DIR AND NNCAM_LIBRARIES)

  find_path(NNCAM_INCLUDE_DIR nncam.h
    PATH_SUFFIXES libnncam
    ${_obIncDir}
    ${GNUWIN32_DIR}/include
  )

  find_library(NNCAM_LIBRARIES NAMES nncam
    PATHS
    ${_obLinkDir}
    ${GNUWIN32_DIR}/lib
  )

  if(NNCAM_INCLUDE_DIR AND NNCAM_LIBRARIES)
    set(NNCAM_FOUND TRUE)
  else (NNCAM_INCLUDE_DIR AND NNCAM_LIBRARIES)
    set(NNCAM_FOUND FALSE)
  endif(NNCAM_INCLUDE_DIR AND NNCAM_LIBRARIES)

  if (NNCAM_FOUND)
    if (NOT NNCAM_FIND_QUIETLY)
      message(STATUS "Found NNCAM: ${NNCAM_LIBRARIES}")
    endif (NOT NNCAM_FIND_QUIETLY)
  else (NNCAM_FOUND)
    if (NNCAM_FIND_REQUIRED)
      message(FATAL_ERROR "NNCAM not found. Please install NNCAM Library http://www.indilib.org")
    endif (NNCAM_FIND_REQUIRED)
  endif (NNCAM_FOUND)

  mark_as_advanced(NNCAM_INCLUDE_DIR NNCAM_LIBRARIES)

endif (NNCAM_INCLUDE_DIR AND NNCAM_LIBRARIES)