Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to import pigpio via FetchContent_Declare #523

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,28 @@ add_compile_options(-Wall)

# libpigpio.(so|a)
add_library(pigpio pigpio.c command.c custom.cext)
add_library(pigpio::core ALIAS pigpio)
target_include_directories(
pigpio
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)


# libpigpiod_if.(so|a)
add_library(pigpiod_if pigpiod_if.c command.c)
add_library(pigpiod::if ALIAS pigpiod_if)
target_include_directories(
pigpiod_if
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

# libpigpiod_if2.(so|a)
add_library(pigpiod_if2 pigpiod_if2.c command.c)
add_library(pigpiod::if2 ALIAS pigpiod_if2)
target_include_directories(
pigpiod_if2
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

# x_pigpio
add_executable(x_pigpio x_pigpio.c)
Expand Down Expand Up @@ -124,4 +140,4 @@ endif()

# package project

include (CPack)
include (CPack)
2 changes: 1 addition & 1 deletion pigpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ typedef void *(gpioThreadFunc_t) (void *);

/* Longest busy delay */

#define PI_MAX_BUSY_DELAY 100
#define PI_MAX_BUSY_DELAY 200

/* timeout: 0-60000 */

Expand Down