aboutsummaryrefslogtreecommitdiff
path: root/dep/efsw/CMakeLists.txt
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-05-29 12:23:06 +0200
committerOvahlord <dreadkiller@gmx.de>2024-06-20 01:13:20 +0200
commit6b89285966d8d21a5f43dac702d50b917f71b19d (patch)
treefdddad39ff2dff72a0beaf382b623737d5c614f6 /dep/efsw/CMakeLists.txt
parentd8c0b72006539951376fc86dbee245822f732e19 (diff)
Dep/efsw: Update to SpartanJ/efsw@36c1c7004a34b6f40719f0830bcfb10325415451
(cherry picked from commit 937e61853319ac0e5b29f0bcbe5390a71cb7625f)
Diffstat (limited to 'dep/efsw/CMakeLists.txt')
-rw-r--r--dep/efsw/CMakeLists.txt85
1 files changed, 63 insertions, 22 deletions
diff --git a/dep/efsw/CMakeLists.txt b/dep/efsw/CMakeLists.txt
index 03f6c153115..9817525931c 100644
--- a/dep/efsw/CMakeLists.txt
+++ b/dep/efsw/CMakeLists.txt
@@ -1,68 +1,109 @@
if (BUILD_SHARED_LIBS)
- set(SRCS
+ set(EFSW_CPP_SOURCE
+ src/efsw/Atomic.hpp
+ src/efsw/base.hpp
src/efsw/Debug.cpp
+ src/efsw/Debug.hpp
src/efsw/DirectorySnapshot.cpp
+ src/efsw/DirectorySnapshot.hpp
src/efsw/DirectorySnapshotDiff.cpp
+ src/efsw/DirectorySnapshotDiff.hpp
src/efsw/DirWatcherGeneric.cpp
+ src/efsw/DirWatcherGeneric.hpp
src/efsw/FileInfo.cpp
+ src/efsw/FileInfo.hpp
src/efsw/FileSystem.cpp
+ src/efsw/FileSystem.hpp
src/efsw/FileWatcher.cpp
src/efsw/FileWatcherCWrapper.cpp
src/efsw/FileWatcherGeneric.cpp
+ src/efsw/FileWatcherGeneric.hpp
src/efsw/FileWatcherImpl.cpp
+ src/efsw/FileWatcherImpl.hpp
+ src/efsw/Lock.hpp
src/efsw/Log.cpp
src/efsw/Mutex.cpp
+ src/efsw/Mutex.hpp
+ src/efsw/sophist.h
src/efsw/String.cpp
+ src/efsw/String.hpp
src/efsw/System.cpp
+ src/efsw/System.hpp
src/efsw/Thread.cpp
+ src/efsw/Thread.hpp
+ src/efsw/Utf.hpp
src/efsw/Watcher.cpp
- src/efsw/WatcherGeneric.cpp)
+ src/efsw/Watcher.hpp
+ src/efsw/WatcherGeneric.cpp
+ src/efsw/WatcherGeneric.hpp
+ src/efsw/platform/platformimpl.hpp
+ )
if (WIN32)
- list (APPEND SRCS
+ list (APPEND EFSW_CPP_SOURCE
src/efsw/platform/win/FileSystemImpl.cpp
+ src/efsw/platform/win/FileSystemImpl.hpp
src/efsw/platform/win/MutexImpl.cpp
+ src/efsw/platform/win/MutexImpl.hpp
src/efsw/platform/win/SystemImpl.cpp
- src/efsw/platform/win/ThreadImpl.cpp)
+ src/efsw/platform/win/SystemImpl.hpp
+ src/efsw/platform/win/ThreadImpl.cpp
+ src/efsw/platform/win/ThreadImpl.hpp)
else ()
- list (APPEND SRCS
+ list (APPEND EFSW_CPP_SOURCE
src/efsw/platform/posix/FileSystemImpl.cpp
+ src/efsw/platform/posix/FileSystemImpl.hpp
src/efsw/platform/posix/MutexImpl.cpp
+ src/efsw/platform/posix/MutexImpl.hpp
src/efsw/platform/posix/SystemImpl.cpp
- src/efsw/platform/posix/ThreadImpl.cpp)
+ src/efsw/platform/posix/SystemImpl.hpp
+ src/efsw/platform/posix/ThreadImpl.cpp
+ src/efsw/platform/posix/ThreadImpl.hpp)
endif()
if (APPLE)
- list (APPEND SRCS
+ list (APPEND EFSW_CPP_SOURCE
src/efsw/FileWatcherFSEvents.cpp
+ src/efsw/FileWatcherFSEvents.hpp
src/efsw/FileWatcherKqueue.cpp
+ src/efsw/FileWatcherKqueue.hpp
src/efsw/WatcherFSEvents.cpp
- src/efsw/WatcherKqueue.cpp)
-
- exec_program(uname ARGS -v OUTPUT_VARIABLE OSX_VERSION)
- string(REGEX MATCH "[0-9]+" OSX_VERSION ${OSX_VERSION})
- if (NOT OSX_VERSION GREATER 9)
- set(OPTIONAL_COMPILE_DEFINITIONS "-DEFSW_FSEVENTS_NOT_SUPPORTED")
- endif()
+ src/efsw/WatcherFSEvents.hpp
+ src/efsw/WatcherKqueue.cpp
+ src/efsw/WatcherKqueue.hpp)
set(OPTIONAL_LINK_LIBRARIES "-framework CoreFoundation" "-framework CoreServices")
elseif (WIN32)
- list (APPEND SRCS
+ list (APPEND EFSW_CPP_SOURCE
src/efsw/FileWatcherWin32.cpp
- src/efsw/WatcherWin32.cpp)
+ src/efsw/FileWatcherWin32.hpp
+ src/efsw/WatcherWin32.cpp
+ src/efsw/WatcherWin32.hpp)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- list (APPEND SRCS
+ list (APPEND EFSW_CPP_SOURCE
src/efsw/FileWatcherInotify.cpp
- src/efsw/WatcherInotify.cpp)
- if (NOT EXISTS "/usr/include/sys/inotify.h" AND NOT EXISTS "/usr/local/include/sys/inotify.h")
+ src/efsw/FileWatcherInotify.hpp
+ src/efsw/WatcherInotify.cpp
+ src/efsw/WatcherInotify.hpp)
+ find_path(EFSW_INOTIFY_H
+ NAMES
+ sys/inotify.h
+ NO_CACHE
+ )
+ if (EFSW_INOTIFY_H STREQUAL "EFSW_INOTIFY_H-NOTFOUND")
+ list (APPEND EFSW_CPP_SOURCE
+ src/efsw/inotify-nosys.h
+ )
set(OPTIONAL_COMPILE_DEFINITIONS "-DEFSW_INOTIFY_NOSYS")
endif()
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
- list (APPEND SRCS
+ list (APPEND EFSW_CPP_SOURCE
src/efsw/FileWatcherKqueue.cpp
- src/efsw/WatcherKqueue.cpp)
+ src/efsw/FileWatcherKqueue.hpp
+ src/efsw/WatcherKqueue.cpp
+ src/efsw/WatcherKqueue.hpp)
endif()
- add_library(efsw STATIC ${SRCS})
+ add_library(efsw STATIC ${EFSW_CPP_SOURCE})
target_include_directories(efsw
PUBLIC