1 # Configure libudev environment
3 # UDEV_FOUND - system has a libudev
4 # UDEV_INCLUDE_DIR - where to find header files
5 # UDEV_LIBRARIES - the libraries to link against udev
6 # UDEV_STABLE - it's true when is the version greater or equals to 143 - version when the libudev was stabilized in its API
8 # copyright (c) 2011 Petr Vanek <petr@scribus.info>
9 # Redistribution and use of this file is allowed according to the terms of the BSD license.
24 /usr/${CMAKE_INSTALL_LIBDIR}
25 /usr/local/${CMAKE_INSTALL_LIBDIR}
29 IF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR)
31 execute_process(COMMAND pkg-config --atleast-version=143 libudev RESULT_VARIABLE UDEV_STABLE)
32 # retvale is 0 of the condition is "true" so we need to negate the value...
38 message(STATUS "libudev stable: ${UDEV_STABLE}")
39 ENDIF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR)
42 MESSAGE(STATUS "Found UDev: ${UDEV_LIBRARIES}")
43 MESSAGE(STATUS " include: ${UDEV_INCLUDE_DIR}")
45 MESSAGE(STATUS "UDev not found.")
46 MESSAGE(STATUS "UDev: You can specify includes: -DUDEV_PATH_INCLUDES=/opt/udev/include")
47 MESSAGE(STATUS " currently found includes: ${UDEV_INCLUDE_DIR}")
48 MESSAGE(STATUS "UDev: You can specify libs: -DUDEV_PATH_LIB=/opt/udev/lib")
49 MESSAGE(STATUS " currently found libs: ${UDEV_LIBRARIES}")
50 IF (UDev_FIND_REQUIRED)
51 MESSAGE(FATAL_ERROR "Could not find UDev library")
52 ENDIF (UDev_FIND_REQUIRED)