Skip to content

Commit

Permalink
simpleio: look explicitly for linux/gpio.h as it seems that some BSDs…
Browse files Browse the repository at this point in the history
… have linux/types.h?

fix #1675
  • Loading branch information
jcelerier committed Jan 14, 2025
1 parent 1c3152d commit 36af590
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/score-plugin-protocols/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ if(OSSIA_PROTOCOL_ARTNET)
endif()
endif()

find_path(LINUX_HEADERS_INCLUDE_DIR linux/types.h)
find_path(LINUX_HEADERS_INCLUDE_DIR linux/gpio.h)
if(LINUX_HEADERS_INCLUDE_DIR AND UNIX AND NOT APPLE AND NOT EMSCRIPTEN)
target_sources(${PROJECT_NAME} PRIVATE ${SIMPLEIO_HDRS} ${SIMPLEIO_SRCS})
target_compile_definitions(${PROJECT_NAME} PRIVATE OSSIA_PROTOCOL_SIMPLEIO)
Expand Down

2 comments on commit 36af590

@yurivict
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct way to check for FreeBSD in cmake is:
CMAKE_SYSTEM_NAME MATCHES "FreeBSD"

@jcelerier
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm but this wouldn't cover other non-linux unix OSes.. for instance DragonflyBSD, OpenBSD, I assume would all still fail if I added this check

Please sign in to comment.