mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Merge #3611
This commit is contained in:
commit
ab52c8bcd7
@ -4,20 +4,27 @@
|
||||
|
||||
# This module defines
|
||||
# INOTIFY_INCLUDE_DIR, where to find inotify.h, etc.
|
||||
# INOTIFY_LIBRARY_DIR, the directory holding the inotify library.
|
||||
# INOTIFY_FOUND, If false, do not try to use inotify.
|
||||
# also defined, but not for general use are
|
||||
# INOTIFY_LIBRARY, where to find the inotify library.
|
||||
|
||||
find_path(INOTIFY_INCLUDE_DIR sys/inotify.h
|
||||
HINTS /usr/include/${CMAKE_LIBRARY_ARCHITECTURE})
|
||||
PATH_SUFFIXES inotify)
|
||||
mark_as_advanced(INOTIFY_INCLUDE_DIR)
|
||||
|
||||
find_library(INOTIFY_LIBRARY inotify PATH_SUFFIXES lib/inotify)
|
||||
|
||||
get_filename_component(INOTIFY_LIBRARY_DIR ${INOTIFY_LIBRARY} DIRECTORY)
|
||||
mark_as_advanced(INOTIFY_LIBRARY_DIR)
|
||||
|
||||
# all listed variables are TRUE
|
||||
# handle the QUIETLY and REQUIRED arguments and set INOTIFY_FOUND to TRUE if
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(INOTIFY DEFAULT_MSG INOTIFY_INCLUDE_DIR)
|
||||
find_package_handle_standard_args(INOTIFY DEFAULT_MSG INOTIFY_INCLUDE_DIR INOTIFY_LIBRARY_DIR)
|
||||
|
||||
IF(INOTIFY_FOUND)
|
||||
SET(INotify_INCLUDE_DIRS ${INOTIFY_INCLUDE_DIR})
|
||||
SET(INotify_LIBRARY_DIRS ${INOTIFY_LIBRARY_DIR})
|
||||
ENDIF(INOTIFY_FOUND)
|
||||
|
||||
|
||||
@ -22,11 +22,11 @@ if ( APPLE )
|
||||
)
|
||||
endif()
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD|OpenBSD")
|
||||
list(APPEND OS_SPECIFIC_LINK_LIBRARIES
|
||||
inotify
|
||||
)
|
||||
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
|
||||
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD|OpenBSD")
|
||||
|
||||
if(SPARKLE_FOUND AND NOT BUILD_LIBRARIES_ONLY)
|
||||
list (APPEND OS_SPECIFIC_LINK_LIBRARIES ${SPARKLE_LIBRARY})
|
||||
@ -119,6 +119,11 @@ if(QTKEYCHAIN_FOUND OR QT5KEYCHAIN_FOUND)
|
||||
include_directories(${QTKEYCHAIN_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(INOTIFY_FOUND)
|
||||
include_directories(${INOTIFY_INCLUDE_DIR})
|
||||
link_directories(${INOTIFY_LIBRARY_DIR})
|
||||
endif()
|
||||
|
||||
if(NEON_FOUND)
|
||||
list(APPEND libsync_LINK_TARGETS ${NEON_LIBRARIES} httpbf)
|
||||
include_directories(${NEON_INCLUDE_DIRS})
|
||||
@ -157,6 +162,10 @@ set_target_properties( ${synclib_NAME} PROPERTIES
|
||||
|
||||
target_link_libraries(${synclib_NAME} ${libsync_LINK_TARGETS} )
|
||||
|
||||
if(INOTIFY_FOUND)
|
||||
target_link_libraries(${synclib_NAME} ${INOTIFY_LIBRARY} )
|
||||
endif()
|
||||
|
||||
if(BUILD_LIBRARIES_ONLY)
|
||||
#add_library(${synclib_NAME}_static STATIC ${libsync_SRCS} ${syncMoc})
|
||||
#qt5_use_modules(${synclib_NAME}_static Widgets Network Xml Sql)
|
||||
|
||||
@ -182,7 +182,7 @@ void Utility::setLaunchOnStartup(const QString &appName, const QString& guiName,
|
||||
|
||||
qint64 Utility::freeDiskSpace(const QString &path, bool *ok)
|
||||
{
|
||||
#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_FREEBSD_KERNEL) || defined(Q_OS_NETBSD)
|
||||
#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_FREEBSD_KERNEL) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD)
|
||||
Q_UNUSED(ok)
|
||||
struct statvfs stat;
|
||||
statvfs(path.toUtf8().data(), &stat);
|
||||
@ -379,7 +379,7 @@ bool Utility::isLinux()
|
||||
|
||||
bool Utility::isBSD()
|
||||
{
|
||||
#if defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD)
|
||||
#if defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user