diff --git a/Libraries/LibCore/CMakeLists.txt b/Libraries/LibCore/CMakeLists.txt index 3f6eabd28a..49dcd4e081 100644 --- a/Libraries/LibCore/CMakeLists.txt +++ b/Libraries/LibCore/CMakeLists.txt @@ -1,52 +1,17 @@ -# These are the minimal set of sources needed to build the code generators. We separate them to allow -# LibCore to depend on generated sources. set(SOURCES AddressInfoVector.cpp ArgsParser.cpp + ConfigFile.cpp + DirIterator.cpp Directory.cpp DirectoryEntry.cpp - DirIterator.cpp - Environment.cpp - File.cpp - MappedFile.cpp - SocketAddress.cpp - StandardPaths.cpp - Version.cpp -) - -if (WIN32) - list(APPEND SOURCES - ProcessWindows.cpp - SocketpairWindows.cpp - SystemWindows.cpp) -else() - list(APPEND SOURCES - Process.cpp - System.cpp) -endif() - -ladybird_lib(LibCoreMinimal coreminimal) - -if (WIN32) - find_path(DIRENT_INCLUDE_DIR dirent.h REQUIRED) - target_include_directories(LibCoreMinimal PRIVATE ${DIRENT_INCLUDE_DIR}) -endif() - -if (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") - # NetBSD has its shm_open and shm_unlink functions in librt so we need to link that - target_link_libraries(LibCoreMinimal PRIVATE rt) -endif() - -if (LAGOM_TOOLS_ONLY) - return() -endif() - -set(SOURCES - ConfigFile.cpp ElapsedTimer.cpp + Environment.cpp EventLoop.cpp EventLoopImplementation.cpp EventReceiver.cpp + File.cpp + MappedFile.cpp MimeData.cpp Notifier.cpp ReportTime.cpp @@ -54,31 +19,37 @@ set(SOURCES ResourceImplementation.cpp ResourceImplementationFile.cpp SharedVersion.cpp + SocketAddress.cpp + StandardPaths.cpp SystemServerTakeover.cpp ThreadEventQueue.cpp Timer.cpp + Version.cpp ) if (WIN32) list(APPEND SOURCES - SocketWindows.cpp AnonymousBufferWindows.cpp EventLoopImplementationWindows.cpp + LocalServerWindows.cpp + ProcessWindows.cpp + SocketWindows.cpp + SocketpairWindows.cpp + SystemWindows.cpp + TCPServerWindows.cpp UDPServerWindows.cpp - TCPServerWindows.cpp) + ) else() list(APPEND SOURCES - Socket.cpp AnonymousBuffer.cpp EventLoopImplementationUnix.cpp + LocalServer.cpp + Process.cpp + Socket.cpp + System.cpp + TCPServer.cpp UDPServer.cpp - TCPServer.cpp) -endif() - -if (NOT WIN32) - list(APPEND SOURCES LocalServer.cpp) -else() - list(APPEND SOURCES LocalServerWindows.cpp) + ) endif() include(CheckIncludeFile) @@ -120,7 +91,6 @@ endif() ladybird_lib(LibCore core) target_link_libraries(LibCore PRIVATE LibUnicode LibURL Threads::Threads) -target_link_libraries(LibCore PUBLIC LibCoreMinimal) if (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") # NetBSD has its shm_open and shm_unlink functions in librt so we need to link that @@ -144,6 +114,8 @@ endif() if (WIN32) target_link_libraries(LibCore PRIVATE ntdll.dll) + find_path(DIRENT_INCLUDE_DIR dirent.h REQUIRED) + target_include_directories(LibCore PRIVATE ${DIRENT_INCLUDE_DIR}) endif() if (ANDROID) diff --git a/Libraries/LibFileSystem/CMakeLists.txt b/Libraries/LibFileSystem/CMakeLists.txt index eed97fe1aa..4806290f04 100644 --- a/Libraries/LibFileSystem/CMakeLists.txt +++ b/Libraries/LibFileSystem/CMakeLists.txt @@ -3,4 +3,4 @@ set(SOURCES ) ladybird_lib(LibFileSystem filesystem) -target_link_libraries(LibFileSystem PRIVATE LibCoreMinimal) +target_link_libraries(LibFileSystem PRIVATE LibCore) diff --git a/Libraries/LibIDL/CMakeLists.txt b/Libraries/LibIDL/CMakeLists.txt index 0d42d63148..15912e97fd 100644 --- a/Libraries/LibIDL/CMakeLists.txt +++ b/Libraries/LibIDL/CMakeLists.txt @@ -5,4 +5,4 @@ set(SOURCES ) ladybird_lib(LibIDL idl) -target_link_libraries(LibIDL PRIVATE LibCoreMinimal LibFileSystem) +target_link_libraries(LibIDL PRIVATE LibCore LibFileSystem) diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt index a025e148f2..a568fc37bf 100644 --- a/Meta/Lagom/CMakeLists.txt +++ b/Meta/Lagom/CMakeLists.txt @@ -66,7 +66,7 @@ if (ENABLE_LAGOM_CCACHE) endif() if (ENABLE_FUZZERS_LIBFUZZER OR ENABLE_FUZZERS_OSSFUZZ) - set(ENABLE_FUZZERS ON) + set(ENABLE_FUZZERS ON) endif() # We need to make sure not to build code generators for Fuzzer builds, as they already have their own main.cpp @@ -117,7 +117,7 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") message(FATAL_ERROR "Fuzzer Sanitizer (-fsanitize=fuzzer) is only supported for Fuzzer targets with LLVM. " "Reconfigure CMake with -DCMAKE_C_COMPILER and -DCMAKE_CXX_COMPILER pointing to a clang-based toolchain " - "or build binaries without built-in fuzzing support by setting -DENABLE_FUZZERS instead." + "or build binaries without built-in fuzzing support by setting -DENABLE_FUZZERS instead." ) endif() endif() @@ -195,7 +195,7 @@ install(TARGETS NoCoverage EXPORT LagomTargets) # AK add_ladybird_subdirectory(AK) -# LibCoreMinimal +# LibCore add_ladybird_subdirectory(Libraries/LibCore) # LibMain diff --git a/Meta/Lagom/Tools/CMakeLists.txt b/Meta/Lagom/Tools/CMakeLists.txt index 893d7fd61d..3cefd9a595 100644 --- a/Meta/Lagom/Tools/CMakeLists.txt +++ b/Meta/Lagom/Tools/CMakeLists.txt @@ -3,7 +3,7 @@ function(lagom_tool tool) add_executable(${tool} ${SOURCES} ${LAGOM_TOOL_SOURCES}) # alias for parity with exports add_executable(Lagom::${tool} ALIAS ${tool}) - target_link_libraries(${tool} AK LibCoreMinimal LibFileSystem GenericClangPlugin ${LAGOM_TOOL_LIBS}) + target_link_libraries(${tool} AK LibCore LibFileSystem GenericClangPlugin ${LAGOM_TOOL_LIBS}) if (NOT LAGOM_TOOL_INSTALL) set(LAGOM_TOOL_INSTALL ${INSTALL_LAGOM_TOOLS}) endif()