Add libfsnotify to the core library for QNX 8
QNX 8 moved the inotify API implementation to a separate library, libfsnotify. Added qt_config_compile_test to verify inotify in libfsnotify Pick-to: 6.8 Change-Id: I5906d8fd0f146dc9db8d9ae2d8c0053bff21b840 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 2dfbfd5f9a800f40afd2a4e48a208a9f781fb0ae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
3f5df82334
commit
a50b3916a2
@ -686,6 +686,11 @@ qt_internal_extend_target(Core CONDITION QCC AND (CMAKE_CXX_COMPILER_VERSION VER
|
||||
PUBLIC_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CXX>:-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
|
||||
|
@ -260,6 +260,26 @@ inotify_rm_watch(0, 1);
|
||||
}
|
||||
")
|
||||
|
||||
# fsnotify
|
||||
qt_config_compile_test(fsnotify
|
||||
LABEL "libfsnotify"
|
||||
LIBRARIES fsnotify
|
||||
CODE
|
||||
"#include <sys/inotify.h>
|
||||
|
||||
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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user