File: FindATIK.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,376 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 Atik Camera Library
# Once done this will define
#
#  ATIK_FOUND - system has ATIK
#  ATIK_INCLUDE_DIR - the ATIK include directory
#  ATIK_LIBRARIES - Link these to use ATIK

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

if (ATIK_INCLUDE_DIR AND ATIK_LIBRARIES)

  # in cache already
  set(ATIK_FOUND TRUE)
  message(STATUS "Found libatik: ${ATIK_LIBRARIES}")

else (ATIK_INCLUDE_DIR AND ATIK_LIBRARIES)

  find_path(ATIK_INCLUDE_DIR AtikCameras.h
    PATH_SUFFIXES libatik
    ${_obIncDir}
    ${GNUWIN32_DIR}/include
  )

  find_library(ATIK_LIBRARIES NAMES atikcameras
    PATHS
    ${_obLinkDir}
    ${GNUWIN32_DIR}/lib
  )

  if(ATIK_INCLUDE_DIR AND ATIK_LIBRARIES)
    set(ATIK_FOUND TRUE)
  else (ATIK_INCLUDE_DIR AND ATIK_LIBRARIES)
    set(ATIK_FOUND FALSE)
  endif(ATIK_INCLUDE_DIR AND ATIK_LIBRARIES)

  if (ATIK_FOUND)
    if (NOT ATIK_FIND_QUIETLY)
      message(STATUS "Found Atik Library: ${ATIK_LIBRARIES}")
    endif (NOT ATIK_FIND_QUIETLY)
  else (ATIK_FOUND)
    if (ATIK_FIND_REQUIRED)
      message(FATAL_ERROR "Atik Library not found. Please install Atik Library http://www.indilib.org")
    endif (ATIK_FIND_REQUIRED)
  endif (ATIK_FOUND)

  mark_as_advanced(ATIK_INCLUDE_DIR ATIK_LIBRARIES)
  
endif (ATIK_INCLUDE_DIR AND ATIK_LIBRARIES)