1 # cmake macro to find LibV4L2
3 # Copyright (c) 2009, Jaroslav Reznik <jreznik@redhat.com>
5 # Once done this will define:
7 # LIBV4L2_FOUND - System has LibV4L2
8 # LIBV4L2_INCLUDE_DIR - The LibV4L2 include directory
9 # LIBV4L2_LIBRARY - The libraries needed to use LibV4L2
11 # Redistribution and use is allowed according to the terms of the BSD license.
12 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
14 IF (LIBV4L2_INCLUDE_DIR AND LIBV4L2_LIBRARY)
15 # Already in cache, be silent
16 SET (LIBV4L2_FIND_QUIETLY TRUE)
17 ENDIF (LIBV4L2_INCLUDE_DIR AND LIBV4L2_LIBRARY)
19 FIND_PATH (LIBV4L2_INCLUDE_DIR libv4l2.h)
21 FIND_LIBRARY (LIBV4L2_LIBRARY v4l2)
23 INCLUDE (FindPackageHandleStandardArgs)
24 FIND_PACKAGE_HANDLE_STANDARD_ARGS (LibV4L2 DEFAULT_MSG LIBV4L2_INCLUDE_DIR LIBV4L2_LIBRARY)
26 MARK_AS_ADVANCED(LIBV4L2_INCLUDE_DIR LIBV4L2_LIBRARY)