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