Skip to content

Commit

Permalink
Merge pull request #176 from Shauren/master
Browse files Browse the repository at this point in the history
Replace hardcoded inotify.h paths with find_path in CMakeLists
  • Loading branch information
SpartanJ committed Jun 2, 2024
2 parents 36c1c70 + e71ebc5 commit 8f59044
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
src/efsw/WatcherInotify.cpp
)

if(NOT EXISTS "/usr/include/sys/inotify.h" AND NOT EXISTS "/usr/local/include/sys/inotify.h")
find_path(EFSW_INOTIFY_H NAMES sys/inotify.h NO_CACHE)
if(EFSW_INOTIFY_H STREQUAL "EFSW_INOTIFY_H-NOTFOUND")
target_compile_definitions(efsw PRIVATE EFSW_INOTIFY_NOSYS)
endif()
elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
Expand Down

0 comments on commit 8f59044

Please sign in to comment.