File: FindLibCameraApps.cmake

package info (click to toggle)
indi-weewx-json 1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 404 kB
  • sloc: cpp: 261; makefile: 2
file content (77 lines) | stat: -rw-r--r-- 2,217 bytes parent folder | download | duplicates (99)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# - Try to find LIBCAMERAAPPS Library
# Once done this will define
#
#  LIBCAMERAAPPS_FOUND - system has LIBCAMERAAPPS
#  LIBCAMERAAPPS_APPS - Link these to use Apps
#  LIBCAMERAAPPS_ENCODERS - Link these to use Encoders
#  LIBCAMERAAPPS_IMAGES - Link these to use Images
#  LIBCAMERAAPPS_OUTPUTS - Link these to use Outputs
#  LIBCAMERAAPPS_PREVIEW - Link these to use Preview
#  LIBCAMERAAPPS_POST - Link these to use Post Processing Stages

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

if (LIBCAMERAAPPS_APPS)

  # in cache already
  set(LIBCAMERAAPPS_FOUND TRUE)
  message(STATUS "Found LIBCAMERAAPPS: ${LIBCAMERAAPPS_APPS}")

else (LIBCAMERAAPPS_APPS)

    find_library(LIBCAMERAAPPS_APPS NAMES camera_app
      PATHS
      ${_obLinkDir}
      ${GNUWIN32_DIR}/lib
    )

    find_library(LIBCAMERAAPPS_ENCODERS NAMES encoders
      PATHS
      ${_obLinkDir}
      ${GNUWIN32_DIR}/lib
    )

    find_library(LIBCAMERAAPPS_IMAGES NAMES images
      PATHS
      ${_obLinkDir}
      ${GNUWIN32_DIR}/lib
    )

    find_library(LIBCAMERAAPPS_OUTPUTS NAMES outputs
      PATHS
      ${_obLinkDir}
      ${GNUWIN32_DIR}/lib
    )

    find_library(LIBCAMERAAPPS_POST NAMES post_processing_stages
      PATHS
      ${_obLinkDir}
      ${GNUWIN32_DIR}/lib
    )

    find_library(LIBCAMERAAPPS_PREVIEW NAMES preview
      PATHS
      ${_obLinkDir}
      ${GNUWIN32_DIR}/lib
    )

  if(LIBCAMERAAPPS_APPS)
    set(LIBCAMERAAPPS_FOUND TRUE)
  else (LIBCAMERAAPPS_APPS)
    set(LIBCAMERAAPPS_FOUND FALSE)
  endif(LIBCAMERAAPPS_APPS)

  if (LIBCAMERAAPPS_FOUND)
    if (NOT LIBCAMERAAPPS_FIND_QUIETLY)
      message(STATUS "Found LIBCAMERAAPPS Library: ${LIBCAMERAAPPS_APPS}")
    endif (NOT LIBCAMERAAPPS_FIND_QUIETLY)
  else (LIBCAMERAAPPS_FOUND)
    if (LIBCAMERAAPPS_FIND_REQUIRED)
      message(FATAL_ERROR "LIBCAMERAAPPS Library not found. Please install libcamera-apps")
    endif (LIBCAMERAAPPS_FIND_REQUIRED)
  endif (LIBCAMERAAPPS_FOUND)

  mark_as_advanced(LIBCAMERAAPPS_APPS LIBCAMERAAPPS_ENCODERS LIBCAMERAAPPS_IMAGES LIBCAMERAAPPS_OUTPUTS LIBCAMERAAPPS_POST LIBCAMERAAPPS_PREVIEW)
  
endif (LIBCAMERAAPPS_APPS)