From: Alexander Schaefer Date: Thu, 10 Mar 2016 20:44:33 +0000 (+0100) Subject: Move CMake find script to util folder. X-Git-Tag: archive/raspbian/1.68-2+rpi1~88^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=39856dc7fe590b50b348ad26b3ab8fafee5a9abd;p=pigpio.git Move CMake find script to util folder. --- diff --git a/cmake/Modules/Findpigpio.cmake b/cmake/Modules/Findpigpio.cmake deleted file mode 100644 index 717699f..0000000 --- a/cmake/Modules/Findpigpio.cmake +++ /dev/null @@ -1,25 +0,0 @@ -################################################################################ -### Find the pigpio includes and shared libraries. -################################################################################ - -# 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) - -# Find the path to the pigpio libraries. -find_library(pigpio_LIBRARY - NAMES libpigpio.so libpigpiod_if.so libpigpiod_if2.so - 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}) -set(pigpio_LIBRARIES ${pigpio_LIBRARY}) - -# Handle REQUIRED, QUIET, and version arguments -# and set the _FOUND variable. -find_package_handle_standard_args(pigpio - DEFAULT_MSG - pigpio_INCLUDE_DIR pigpio_LIBRARY) diff --git a/util/Findpigpio.cmake b/util/Findpigpio.cmake new file mode 100644 index 0000000..717699f --- /dev/null +++ b/util/Findpigpio.cmake @@ -0,0 +1,25 @@ +################################################################################ +### Find the pigpio includes and shared libraries. +################################################################################ + +# 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) + +# Find the path to the pigpio libraries. +find_library(pigpio_LIBRARY + NAMES libpigpio.so libpigpiod_if.so libpigpiod_if2.so + 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}) +set(pigpio_LIBRARIES ${pigpio_LIBRARY}) + +# Handle REQUIRED, QUIET, and version arguments +# and set the _FOUND variable. +find_package_handle_standard_args(pigpio + DEFAULT_MSG + pigpio_INCLUDE_DIR pigpio_LIBRARY)