diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index 31fbd36fe9e..f2c7519aba5 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -686,6 +686,11 @@ qt_internal_extend_target(Core CONDITION QCC AND (CMAKE_CXX_COMPILER_VERSION VER PUBLIC_COMPILE_OPTIONS $<$:-Wno-invalid-offsetof> ) +qt_internal_extend_target(Core CONDITION QNX AND QT_FEATURE_fsnotify + LIBRARIES + fsnotify +) + qt_internal_extend_target(Core CONDITION LINUX AND QT_BUILD_SHARED_LIBS SOURCES global/minimum-linux_p.h diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake index e588b2b8cdd..799c1e8b8bc 100644 --- a/src/corelib/configure.cmake +++ b/src/corelib/configure.cmake @@ -260,6 +260,26 @@ inotify_rm_watch(0, 1); } ") +# fsnotify +qt_config_compile_test(fsnotify + LABEL "libfsnotify" + LIBRARIES fsnotify + CODE +"#include + +int main(void) +{ + /* BEGIN TEST: */ + int fd = inotify_init(); + if (fd >= 0) { + inotify_add_watch(fd, \"foobar\", IN_ACCESS); + inotify_rm_watch(fd, 1); + } + /* END TEST: */ + return 0; +} +") + qt_config_compile_test(sysv_shm LABEL "System V/XSI shared memory" CODE @@ -647,7 +667,11 @@ qt_feature("icu" PRIVATE ) qt_feature("inotify" PUBLIC PRIVATE LABEL "inotify" - CONDITION TEST_inotify + CONDITION TEST_inotify OR TEST_fsnotify +) +qt_feature("fsnotify" + LABEL "fsnotify" + CONDITION TEST_fsnotify ) qt_feature_definition("inotify" "QT_NO_INOTIFY" NEGATE VALUE "1") qt_feature("ipc_posix"