diff --git a/CMakeLists.txt b/CMakeLists.txt index 883b624..33d974a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,11 @@ else() option(ENABLE_UDEV "use udev to search JTAG adapter from /dev/xx" ON) endif() 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(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)") @@ -64,7 +68,7 @@ if (USE_PKGCONFIG) endif() if (ENABLE_LIBGPIOD) - pkg_check_modules(LIBGPIOD REQUIRED libgpiod) + pkg_check_modules(LIBGPIOD libgpiod) if (NOT LIBGPIOD_FOUND) message("libgpiod not found, disabling gpiod support") set(ENABLE_LIBGPIOD OFF)