mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 18:35:32 +02:00
39 lines
1.7 KiB
CMake
39 lines
1.7 KiB
CMake
# Try to find the UVCCameraControl library to manipulate webcam via USB on OS X
|
|
#
|
|
# You must provide a UVCCAMERACONTROL_ROOT_DIR which contains lib and include directories
|
|
#
|
|
# Once done this will define
|
|
#
|
|
# UVCCAMERACONTROL_FOUND - system found UVCCameraControl
|
|
# UVCCAMERACONTROL_INCLUDE_DIRS - the UVCCameraControl include directory
|
|
# UVCCAMERACONTROL_LIBRARIES - Link this to use UVCCameraControl
|
|
#
|
|
# Created on 6/19/2013 by Andrzej Kapolka
|
|
# Copyright (c) 2013 High Fidelity
|
|
#
|
|
|
|
if (UVCCAMERACONTROL_LIBRARIES AND UVCCAMERACONTROL_INCLUDE_DIRS)
|
|
# in cache already
|
|
set(UVCCAMERACONTROL_FOUND TRUE)
|
|
else (UVCCAMERACONTROL_LIBRARIES AND UVCCAMERACONTROL_INCLUDE_DIRS)
|
|
find_path(UVCCAMERACONTROL_INCLUDE_DIRS UVCCameraControl.hpp ${UVCCAMERACONTROL_ROOT_DIR}/include)
|
|
find_library(UVCCAMERACONTROL_LIBRARIES libUVCCameraControl.a ${UVCCAMERACONTROL_ROOT_DIR}/lib)
|
|
|
|
if (UVCCAMERACONTROL_INCLUDE_DIRS AND UVCCAMERACONTROL_LIBRARIES)
|
|
set(UVCCAMERACONTROL_FOUND TRUE)
|
|
endif (UVCCAMERACONTROL_INCLUDE_DIRS AND UVCCAMERACONTROL_LIBRARIES)
|
|
|
|
if (UVCCAMERACONTROL_FOUND)
|
|
if (NOT UVCCAMERACONTROL_FIND_QUIETLY)
|
|
message(STATUS "Found UVCCameraControl: ${UVCCAMERACONTROL_LIBRARIES}")
|
|
endif (NOT UVCCAMERACONTROL_FIND_QUIETLY)
|
|
else (UVCCAMERACONTROL_FOUND)
|
|
if (UVCCAMERACONTROL_FIND_REQUIRED)
|
|
message(FATAL_ERROR "Could not find UVCCameraControl")
|
|
endif (UVCCAMERACONTROL_FIND_REQUIRED)
|
|
endif (UVCCAMERACONTROL_FOUND)
|
|
|
|
# show the UVCCAMERACONTROL_INCLUDE_DIRS and UVCCAMERACONTROL_LIBRARIES variables only in the advanced view
|
|
mark_as_advanced(UVCCAMERACONTROL_INCLUDE_DIRS UVCCAMERACONTROL_LIBRARIES)
|
|
|
|
endif (UVCCAMERACONTROL_LIBRARIES AND UVCCAMERACONTROL_INCLUDE_DIRS)
|