diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,10 +68,10 @@ add_definitions(-DQT_NO_KEYWORDS) remove_definitions(-DQT_NO_CAST_FROM_ASCII) -set(BUILD_KINOTIFY False) -if(CMAKE_SYSTEM_NAME MATCHES "Linux") - set(BUILD_KINOTIFY True) -endif() +find_package(Inotify) +set_package_properties(Inotify PROPERTIES + PURPOSE "Filesystem alteration notifications using inotify") +set(BUILD_KINOTIFY ${Inotify_FOUND}) include_directories( ${CMAKE_BINARY_DIR} diff --git a/src/file/CMakeLists.txt b/src/file/CMakeLists.txt --- a/src/file/CMakeLists.txt +++ b/src/file/CMakeLists.txt @@ -1,3 +1,4 @@ +include_directories(${Inotify_INCLUDE_DIRS}) add_definitions(-DTRANSLATION_DOMAIN=\"baloo_file5\") set(file_static_lib_SRCS @@ -51,6 +52,7 @@ KF5::Crash KF5::ConfigCore KF5::BalooEngine + ${Inotify_LIBRARIES} ) set(file_SRCS