2024-03-25 14:08:52 +00:00
|
|
|
# These are the minimal set of sources needed to build the code generators. We separate them to allow
|
|
|
|
# LibCore to depend on generated sources.
|
2020-05-06 15:40:06 +00:00
|
|
|
set(SOURCES
|
|
|
|
ArgsParser.cpp
|
2022-04-10 16:28:43 +00:00
|
|
|
Directory.cpp
|
2024-10-24 17:22:11 +00:00
|
|
|
DirectoryEntry.cpp
|
|
|
|
DirIterator.cpp
|
2024-03-29 19:32:06 +00:00
|
|
|
Environment.cpp
|
2024-03-25 14:08:52 +00:00
|
|
|
File.cpp
|
|
|
|
StandardPaths.cpp
|
|
|
|
Version.cpp
|
|
|
|
)
|
|
|
|
|
2023-08-30 07:19:29 +00:00
|
|
|
if (WIN32)
|
2024-10-24 17:22:11 +00:00
|
|
|
list(APPEND SOURCES SystemWindows.cpp)
|
2023-08-30 07:19:29 +00:00
|
|
|
else()
|
2024-10-24 17:22:11 +00:00
|
|
|
list(APPEND SOURCES System.cpp)
|
2023-08-30 07:19:29 +00:00
|
|
|
endif()
|
|
|
|
|
2024-03-29 19:32:06 +00:00
|
|
|
serenity_lib(LibCoreMinimal coreminimal)
|
2024-03-25 14:08:52 +00:00
|
|
|
|
2024-10-24 17:56:43 +00:00
|
|
|
if (WIN32)
|
|
|
|
find_path(DIRENT_INCLUDE_DIR dirent.h REQUIRED)
|
|
|
|
target_include_directories(LibCoreMinimal PRIVATE ${DIRENT_INCLUDE_DIR})
|
|
|
|
endif()
|
|
|
|
|
2024-06-23 12:35:17 +00:00
|
|
|
if (LAGOM_TOOLS_ONLY)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2024-03-25 14:08:52 +00:00
|
|
|
set(SOURCES
|
|
|
|
Command.cpp
|
2024-06-23 12:15:58 +00:00
|
|
|
ConfigFile.cpp
|
2024-03-25 14:08:52 +00:00
|
|
|
DateTime.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
ElapsedTimer.cpp
|
|
|
|
Event.cpp
|
|
|
|
EventLoop.cpp
|
2023-04-24 10:25:14 +00:00
|
|
|
EventLoopImplementation.cpp
|
2023-08-06 16:09:39 +00:00
|
|
|
EventReceiver.cpp
|
2021-11-23 10:32:25 +00:00
|
|
|
MappedFile.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
MimeData.cpp
|
|
|
|
Notifier.cpp
|
2021-08-05 23:04:11 +00:00
|
|
|
Process.cpp
|
2023-10-02 20:36:53 +00:00
|
|
|
Resource.cpp
|
|
|
|
ResourceImplementation.cpp
|
|
|
|
ResourceImplementationFile.cpp
|
2024-06-23 12:15:58 +00:00
|
|
|
SessionManagement.cpp
|
2023-02-08 22:05:44 +00:00
|
|
|
Socket.cpp
|
2022-01-15 11:56:48 +00:00
|
|
|
SystemServerTakeover.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
TCPServer.cpp
|
2023-04-23 17:45:12 +00:00
|
|
|
ThreadEventQueue.cpp
|
2020-05-06 15:40:06 +00:00
|
|
|
Timer.cpp
|
|
|
|
UDPServer.cpp
|
|
|
|
)
|
2024-10-27 13:13:42 +00:00
|
|
|
|
|
|
|
if (WIN32)
|
2024-10-31 07:44:19 +00:00
|
|
|
list(APPEND SOURCES
|
|
|
|
AnonymousBufferWindows.cpp
|
|
|
|
EventLoopImplementationWindows.cpp)
|
2024-10-27 13:13:42 +00:00
|
|
|
else()
|
2024-10-31 07:44:19 +00:00
|
|
|
list(APPEND SOURCES
|
|
|
|
AnonymousBuffer.cpp
|
|
|
|
EventLoopImplementationUnix.cpp)
|
2024-10-27 13:13:42 +00:00
|
|
|
endif()
|
|
|
|
|
2023-07-19 15:55:49 +00:00
|
|
|
if (NOT WIN32 AND NOT EMSCRIPTEN)
|
|
|
|
list(APPEND SOURCES LocalServer.cpp)
|
|
|
|
endif()
|
2020-05-06 15:40:06 +00:00
|
|
|
|
2024-08-24 16:15:13 +00:00
|
|
|
# FIXME: Implement these for other systems.
|
2024-06-04 00:10:39 +00:00
|
|
|
if (LINUX AND NOT EMSCRIPTEN)
|
2024-04-21 03:35:17 +00:00
|
|
|
list(APPEND SOURCES
|
|
|
|
FileWatcherLinux.cpp
|
|
|
|
Platform/ProcessStatisticsLinux.cpp
|
2024-08-24 16:15:13 +00:00
|
|
|
TimeZoneWatcherLinux.cpp
|
2024-04-21 03:35:17 +00:00
|
|
|
)
|
2024-02-27 13:32:29 +00:00
|
|
|
elseif (APPLE AND NOT IOS)
|
2024-04-21 03:35:17 +00:00
|
|
|
list(APPEND SOURCES
|
|
|
|
FileWatcherMacOS.mm
|
|
|
|
Platform/ProcessStatisticsMach.cpp
|
2024-08-24 16:15:13 +00:00
|
|
|
TimeZoneWatcherMacOS.mm
|
2024-04-21 03:35:17 +00:00
|
|
|
)
|
2023-01-17 18:49:21 +00:00
|
|
|
else()
|
2024-04-21 03:35:17 +00:00
|
|
|
list(APPEND SOURCES
|
|
|
|
FileWatcherUnimplemented.cpp
|
|
|
|
Platform/ProcessStatisticsUnimplemented.cpp
|
2024-08-24 16:15:13 +00:00
|
|
|
TimeZoneWatcherUnimplemented.cpp
|
2024-04-21 03:35:17 +00:00
|
|
|
)
|
2023-01-17 18:49:21 +00:00
|
|
|
endif()
|
|
|
|
|
2024-04-04 19:59:44 +00:00
|
|
|
if (APPLE OR CMAKE_SYSTEM_NAME STREQUAL "GNU")
|
|
|
|
list(APPEND SOURCES MachPort.cpp)
|
|
|
|
endif()
|
|
|
|
|
2024-06-20 18:33:34 +00:00
|
|
|
if (APPLE)
|
|
|
|
list(APPEND SOURCES IOSurface.cpp)
|
|
|
|
endif()
|
|
|
|
|
2020-05-06 15:40:06 +00:00
|
|
|
serenity_lib(LibCore core)
|
2024-06-25 19:27:20 +00:00
|
|
|
target_link_libraries(LibCore PRIVATE LibCrypt LibUnicode LibURL)
|
2024-03-29 19:32:06 +00:00
|
|
|
target_link_libraries(LibCore PUBLIC LibCoreMinimal)
|
2023-01-18 19:03:14 +00:00
|
|
|
|
|
|
|
if (APPLE)
|
|
|
|
target_link_libraries(LibCore PUBLIC "-framework CoreFoundation")
|
|
|
|
target_link_libraries(LibCore PUBLIC "-framework CoreServices")
|
|
|
|
target_link_libraries(LibCore PUBLIC "-framework Foundation")
|
2024-06-20 18:33:34 +00:00
|
|
|
target_link_libraries(LibCore PUBLIC "-framework IOSurface")
|
2023-01-18 19:03:14 +00:00
|
|
|
endif()
|
2023-09-14 05:19:25 +00:00
|
|
|
|
|
|
|
if (ANDROID)
|
|
|
|
target_link_libraries(LibCore PRIVATE log)
|
|
|
|
endif()
|