Improve CMake handling of libgpiod
This commit is contained in:
parent
bb6d286736
commit
62e6e5a0bf
|
|
@ -11,7 +11,11 @@ else()
|
||||||
option(ENABLE_UDEV "use udev to search JTAG adapter from /dev/xx" ON)
|
option(ENABLE_UDEV "use udev to search JTAG adapter from /dev/xx" ON)
|
||||||
endif()
|
endif()
|
||||||
option(ENABLE_CMSISDAP "enable cmsis DAP interface (requires hidapi)" ON)
|
option(ENABLE_CMSISDAP "enable cmsis DAP interface (requires hidapi)" ON)
|
||||||
option(ENABLE_LIBGPIOD "enable libgpiod bitbang driver (requires libgpiod)" ON)
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
|
option(ENABLE_LIBGPIOD "enable libgpiod bitbang driver (requires libgpiod)" ON)
|
||||||
|
else()
|
||||||
|
set(ENABLE_LIBGPIOD OFF)
|
||||||
|
endif()
|
||||||
option(USE_PKGCONFIG "Use pkgconfig to find libraries" ON)
|
option(USE_PKGCONFIG "Use pkgconfig to find libraries" ON)
|
||||||
option(LINK_CMAKE_THREADS "Use CMake find_package to link the threading library" OFF)
|
option(LINK_CMAKE_THREADS "Use CMake find_package to link the threading library" OFF)
|
||||||
set(ISE_PATH "/opt/Xilinx/14.7" CACHE STRING "ise root directory (default: /opt/Xilinx/14.7)")
|
set(ISE_PATH "/opt/Xilinx/14.7" CACHE STRING "ise root directory (default: /opt/Xilinx/14.7)")
|
||||||
|
|
@ -64,7 +68,7 @@ if (USE_PKGCONFIG)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_LIBGPIOD)
|
if (ENABLE_LIBGPIOD)
|
||||||
pkg_check_modules(LIBGPIOD REQUIRED libgpiod)
|
pkg_check_modules(LIBGPIOD libgpiod)
|
||||||
if (NOT LIBGPIOD_FOUND)
|
if (NOT LIBGPIOD_FOUND)
|
||||||
message("libgpiod not found, disabling gpiod support")
|
message("libgpiod not found, disabling gpiod support")
|
||||||
set(ENABLE_LIBGPIOD OFF)
|
set(ENABLE_LIBGPIOD OFF)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue