2016-03-08 23:05:19 +01:00
|
|
|
################################################################################
|
2016-03-12 21:35:51 +01:00
|
|
|
### Find the pigpio shared libraries.
|
2016-03-08 23:05:19 +01:00
|
|
|
################################################################################
|
|
|
|
|
|
|
|
# Find the path to the pigpio includes.
|
|
|
|
find_path(pigpio_INCLUDE_DIR
|
|
|
|
NAMES pigpio.h pigpiod_if.h pigpiod_if2.h
|
|
|
|
HINTS /usr/local/include)
|
|
|
|
|
2016-03-12 21:35:51 +01:00
|
|
|
# Find the pigpio libraries.
|
2016-03-08 23:05:19 +01:00
|
|
|
find_library(pigpio_LIBRARY
|
2016-03-12 21:35:51 +01:00
|
|
|
NAMES libpigpio.so
|
|
|
|
HINTS /usr/local/lib)
|
|
|
|
find_library(pigpiod_if_LIBRARY
|
|
|
|
NAMES libpigpiod_if.so
|
|
|
|
HINTS /usr/local/lib)
|
|
|
|
find_library(pigpiod_if2_LIBRARY
|
|
|
|
NAMES libpigpiod_if2.so
|
2016-03-08 23:05:19 +01:00
|
|
|
HINTS /usr/local/lib)
|
|
|
|
|
|
|
|
# Set the pigpio variables to plural form to make them accessible for
|
|
|
|
# the paramount cmake modules.
|
|
|
|
set(pigpio_INCLUDE_DIRS ${pigpio_INCLUDE_DIR})
|
|
|
|
set(pigpio_INCLUDES ${pigpio_INCLUDE_DIR})
|
|
|
|
|
|
|
|
# Handle REQUIRED, QUIET, and version arguments
|
|
|
|
# and set the <packagename>_FOUND variable.
|
2017-10-19 18:36:31 +02:00
|
|
|
include(FindPackageHandleStandardArgs)
|
2016-03-08 23:05:19 +01:00
|
|
|
find_package_handle_standard_args(pigpio
|
|
|
|
DEFAULT_MSG
|
2016-03-12 21:35:51 +01:00
|
|
|
pigpio_INCLUDE_DIR pigpio_LIBRARY pigpiod_if_LIBRARY pigpiod_if2_LIBRARY)
|