2021-03-07 02:40:21 +02:00
|
|
|
# Try to find the raw1394, once done this will define:
|
2015-11-05 10:05:41 +02:00
|
|
|
#
|
2020-02-21 17:44:22 +00:00
|
|
|
# RAW1394_FOUND - system has raw1394
|
|
|
|
# RAW1394_INCLUDE_DIR - the raw1394 include directory
|
|
|
|
# RAW1394_LIBRARIES - the libraries needed to use raw1394
|
|
|
|
#
|
2021-03-07 02:40:21 +02:00
|
|
|
# Copyright (c) 2020 Ivailo Monev <xakepa10@gmail.com>
|
2020-02-21 17:44:22 +00:00
|
|
|
#
|
|
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
2015-11-05 10:05:41 +02:00
|
|
|
|
2022-10-02 10:46:46 +03:00
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
pkg_check_modules(PC_RAW1394 QUIET libraw1394)
|
2015-11-05 10:05:41 +02:00
|
|
|
|
2022-10-02 10:46:46 +03:00
|
|
|
set(RAW1394_INCLUDE_DIR ${PC_RAW1394_INCLUDE_DIRS})
|
|
|
|
set(RAW1394_LIBRARIES ${PC_RAW1394_LIBRARIES})
|
2020-02-21 17:44:22 +00:00
|
|
|
set(RAW1394_VERSION ${PC_RAW1394_VERSION})
|
2015-11-05 10:05:41 +02:00
|
|
|
|
2020-02-21 17:44:22 +00:00
|
|
|
if(NOT RAW1394_INCLUDE_DIR OR NOT RAW1394_LIBRARIES)
|
|
|
|
find_path(RAW1394_INCLUDE_DIR
|
|
|
|
NAMES libraw1394/raw1394.h
|
|
|
|
HINTS $ENV{RAW1394DIR}/include
|
|
|
|
)
|
|
|
|
|
|
|
|
find_library(RAW1394_LIBRARIES
|
|
|
|
NAMES raw1394
|
|
|
|
HINTS $ENV{RAW1394DIR}/lib
|
|
|
|
)
|
|
|
|
endif()
|
2015-11-05 10:05:41 +02:00
|
|
|
|
2020-02-21 17:44:22 +00:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(RAW1394
|
|
|
|
VERSION_VAR RAW1394_VERSION
|
|
|
|
REQUIRED_VARS RAW1394_LIBRARIES RAW1394_INCLUDE_DIR
|
|
|
|
)
|
2015-11-05 10:05:41 +02:00
|
|
|
|
2020-02-21 17:44:22 +00:00
|
|
|
mark_as_advanced(RAW1394_INCLUDE_DIR RAW1394_LIBRARIES)
|