KDE/kdenetwork/kopete/cmake/modules
Raphael Kubo da Costa
kubito at gmail.com
Sun Jan 31 16:34:00 CET 2010
SVN commit 1083071 by rkcosta:
Clean up FindLibV4L2.cmake:
* Explain what each defined variable means
* Actually make use of FIND_PACKAGE_HANDLE_STANDARD_ARGUMENTS and
consequently get rid of a lot of duplicate code.
* Use MARK_AS_ADVANCED for the include and library variables.
CCMAIL: kde-buildsystem at kde.org
M +13 -19 FindLibV4L2.cmake
--- trunk/KDE/kdenetwork/kopete/cmake/modules/FindLibV4L2.cmake #1083070:1083071
@@ -1,32 +1,26 @@
-# cmake macro to test LibV4L2
-
+# cmake macro to find LibV4L2
+#
# Copyright (c) 2009, Jaroslav Reznik <jreznik at redhat.com>
#
-# LIBV4L2_FOUND
-# LIBV4L2_INCLUDE_DIR
-# LIBV4L2_LIBRARY
+# Once done this will define:
#
+# LIBV4L2_FOUND - System has LibV4L2
+# LIBV4L2_INCLUDE_DIR - The LibV4L2 include directory
+# LIBV4L2_LIBRARY - The libraries needed to use LibV4L2
+#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-INCLUDE (FindPackageHandleStandardArgs)
-
IF (LIBV4L2_INCLUDE_DIR AND LIBV4L2_LIBRARY)
# Already in cache, be silent
SET (LIBV4L2_FIND_QUIETLY TRUE)
ENDIF (LIBV4L2_INCLUDE_DIR AND LIBV4L2_LIBRARY)
-IF (NOT LIBV4L2_FOUND)
- FIND_PATH (LIBV4L2_INCLUDE_DIR libv4l2.h)
- FIND_LIBRARY (LIBV4L2_LIBRARY NAMES v4l2)
+FIND_PATH (LIBV4L2_INCLUDE_DIR libv4l2.h)
- IF (LIBV4L2_INCLUDE_DIR AND LIBV4L2_LIBRARY)
- SET (LIBV4L2_FOUND TRUE)
- ENDIF( LIBV4L2_INCLUDE_DIR AND LIBV4L2_LIBRARY )
-ENDIF ( NOT LIBV4L2_FOUND)
+FIND_LIBRARY (LIBV4L2_LIBRARY v4l2)
-IF( LIBV4L2_FOUND )
- IF( NOT LIBV4L2_FIND_QUIETLY )
- MESSAGE( STATUS "Found LIBV4L2: ${LIBV4L2_LIBRARY}")
- ENDIF( NOT LIBV4L2_FIND_QUIETLY )
-ENDIF( LIBV4L2_FOUND )
+INCLUDE (FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS (LibV4L2 DEFAULT_MSG LIBV4L2_INCLUDE_DIR LIBV4L2_LIBRARY)
+
+MARK_AS_ADVANCED(LIBV4L2_INCLUDE_DIR LIBV4L2_LIBRARY)
More information about the Kde-buildsystem
mailing list