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.
23 PATHS ${ADDITIONAL_LIBRARY_PATHS}
27 IF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR)
29 execute_process(COMMAND pkg-config --atleast-version=143 libudev RESULT_VARIABLE UDEV_STABLE)
30 # retvale is 0 of the condition is "true" so we need to negate the value...
36 message(STATUS "libudev stable: ${UDEV_STABLE}")
37 ENDIF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR)
40 MESSAGE(STATUS "Found UDev: ${UDEV_LIBRARIES}")
41 MESSAGE(STATUS " include: ${UDEV_INCLUDE_DIR}")
43 MESSAGE(STATUS "UDev not found.")
44 MESSAGE(STATUS "UDev: You can specify includes: -DUDEV_PATH_INCLUDES=/opt/udev/include")
45 MESSAGE(STATUS " currently found includes: ${UDEV_INCLUDE_DIR}")
46 MESSAGE(STATUS "UDev: You can specify libs: -DUDEV_PATH_LIB=/opt/udev/lib")
47 MESSAGE(STATUS " currently found libs: ${UDEV_LIBRARIES}")
48 IF (UDev_FIND_REQUIRED)
49 MESSAGE(FATAL_ERROR "Could not find UDev library")
50 ENDIF (UDev_FIND_REQUIRED)