hyperion.ng/cmake/FindBCM.cmake
Markus addff6f7ef
Dynamic loading of the Dispmanx Grabber (#1440)
* BCM dynamic loading

* cleanup

* better handle start of dispmanx

* set GrabberWrapper pointer to null on exit

* Update DispmanxFrameGrabber.cpp
2022-03-20 14:42:21 +01:00

41 lines
887 B
CMake

# Find Broadcom VideoCore firmware installation
#
# This module defines
# BCM_INCLUDE_DIR - The Broadcom VideoCore include directory
# BCM_LIBRARY - The Broadcom VideoCore BCM_HOST library.
# BCM_FOUND - BCM_HOST is available
#
FIND_PATH(BCM_HOST_INCLUDE_DIR bcm_host.h
PATHS
/usr/include
/usr/local/include
/opt/vc/include
)
FIND_LIBRARY(BCM_HOST_LIBRARY
NAMES bcm_host
PATHS
/usr/lib
/usr/local/lib
/opt/vc/lib
)
if (BCM_HOST_INCLUDE_DIR AND BCM_HOST_LIBRARY)
set(BCM_FOUND TRUE)
endif (BCM_HOST_INCLUDE_DIR AND BCM_HOST_LIBRARY)
if (BCM_FOUND)
SET (BCM_INCLUDE_DIR
${BCM_HOST_INCLUDE_DIR} ${BCM_HOST_INCLUDE_DIR}/interface/vcos/pthreads/
${BCM_HOST_INCLUDE_DIR}/interface/vmcs_host/linux/
)
SET (BCM_LIBRARY ${BCM_HOST_LIBRARY})
else (BCM_FOUND)
SET (BCM_INCLUDE_DIR "")
SET (BCM_LIBRARY "")
endif (BCM_FOUND)
mark_as_advanced(BCM_INCLUDE_DIR BCM_LIBRARY)