| 1 |
# - Try to find LIBCAMERAAPPS Library |
| 2 |
# Once done this will define |
| 3 |
# |
| 4 |
# LIBCAMERAAPPS_FOUND - system has LIBCAMERAAPPS |
| 5 |
# LIBCAMERAAPPS_APPS - Link these to use Apps |
| 6 |
# LIBCAMERAAPPS_ENCODERS - Link these to use Encoders |
| 7 |
# LIBCAMERAAPPS_IMAGES - Link these to use Images |
| 8 |
# LIBCAMERAAPPS_OUTPUTS - Link these to use Outputs |
| 9 |
# LIBCAMERAAPPS_PREVIEW - Link these to use Preview |
| 10 |
# LIBCAMERAAPPS_POST - Link these to use Post Processing Stages |
| 11 |
|
| 12 |
# Redistribution and use is allowed according to the terms of the BSD license. |
| 13 |
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
| 14 |
|
| 15 |
if (LIBCAMERAAPPS_APPS) |
| 16 |
|
| 17 |
# in cache already |
| 18 |
set(LIBCAMERAAPPS_FOUND TRUE) |
| 19 |
message(STATUS "Found LIBCAMERAAPPS: ${LIBCAMERAAPPS_APPS}") |
| 20 |
|
| 21 |
else (LIBCAMERAAPPS_APPS) |
| 22 |
|
| 23 |
find_library(LIBCAMERAAPPS_APPS NAMES camera_app |
| 24 |
PATHS |
| 25 |
${_obLinkDir} |
| 26 |
${GNUWIN32_DIR}/lib |
| 27 |
) |
| 28 |
|
| 29 |
find_library(LIBCAMERAAPPS_ENCODERS NAMES encoders |
| 30 |
PATHS |
| 31 |
${_obLinkDir} |
| 32 |
${GNUWIN32_DIR}/lib |
| 33 |
) |
| 34 |
|
| 35 |
find_library(LIBCAMERAAPPS_IMAGES NAMES images |
| 36 |
PATHS |
| 37 |
${_obLinkDir} |
| 38 |
${GNUWIN32_DIR}/lib |
| 39 |
) |
| 40 |
|
| 41 |
find_library(LIBCAMERAAPPS_OUTPUTS NAMES outputs |
| 42 |
PATHS |
| 43 |
${_obLinkDir} |
| 44 |
${GNUWIN32_DIR}/lib |
| 45 |
) |
| 46 |
|
| 47 |
find_library(LIBCAMERAAPPS_POST NAMES post_processing_stages |
| 48 |
PATHS |
| 49 |
${_obLinkDir} |
| 50 |
${GNUWIN32_DIR}/lib |
| 51 |
) |
| 52 |
|
| 53 |
find_library(LIBCAMERAAPPS_PREVIEW NAMES preview |
| 54 |
PATHS |
| 55 |
${_obLinkDir} |
| 56 |
${GNUWIN32_DIR}/lib |
| 57 |
) |
| 58 |
|
| 59 |
if(LIBCAMERAAPPS_APPS) |
| 60 |
set(LIBCAMERAAPPS_FOUND TRUE) |
| 61 |
else (LIBCAMERAAPPS_APPS) |
| 62 |
set(LIBCAMERAAPPS_FOUND FALSE) |
| 63 |
endif(LIBCAMERAAPPS_APPS) |
| 64 |
|
| 65 |
if (LIBCAMERAAPPS_FOUND) |
| 66 |
if (NOT LIBCAMERAAPPS_FIND_QUIETLY) |
| 67 |
message(STATUS "Found LIBCAMERAAPPS Library: ${LIBCAMERAAPPS_APPS}") |
| 68 |
endif (NOT LIBCAMERAAPPS_FIND_QUIETLY) |
| 69 |
else (LIBCAMERAAPPS_FOUND) |
| 70 |
if (LIBCAMERAAPPS_FIND_REQUIRED) |
| 71 |
message(FATAL_ERROR "LIBCAMERAAPPS Library not found. Please install libcamera-apps") |
| 72 |
endif (LIBCAMERAAPPS_FIND_REQUIRED) |
| 73 |
endif (LIBCAMERAAPPS_FOUND) |
| 74 |
|
| 75 |
mark_as_advanced(LIBCAMERAAPPS_APPS LIBCAMERAAPPS_ENCODERS LIBCAMERAAPPS_IMAGES LIBCAMERAAPPS_OUTPUTS LIBCAMERAAPPS_POST LIBCAMERAAPPS_PREVIEW) |
| 76 |
|
| 77 |
endif (LIBCAMERAAPPS_APPS) |