2024-11-10 09:53:15 -05:00
|
|
|
include(fontconfig)
|
2023-10-14 09:07:38 -04:00
|
|
|
|
2022-04-30 10:46:33 +02:00
|
|
|
set(SOURCES
|
2024-06-29 22:24:01 -06:00
|
|
|
Application.cpp
|
2023-11-19 10:42:11 -05:00
|
|
|
Attribute.cpp
|
2025-03-30 16:21:24 -04:00
|
|
|
Autocomplete.cpp
|
2025-03-15 17:00:58 -04:00
|
|
|
BrowserProcess.cpp
|
2025-03-04 08:48:20 -05:00
|
|
|
ConsoleOutput.cpp
|
2023-08-31 07:07:07 -04:00
|
|
|
CookieJar.cpp
|
|
|
|
Database.cpp
|
2025-03-19 15:50:56 -04:00
|
|
|
DOMNodeProperties.cpp
|
2025-06-06 15:42:12 -04:00
|
|
|
HeadlessWebView.cpp
|
2024-11-10 10:26:07 -05:00
|
|
|
HelperProcess.cpp
|
2025-03-06 17:32:43 -05:00
|
|
|
Mutation.cpp
|
2024-11-10 09:53:15 -05:00
|
|
|
Plugins/FontPlugin.cpp
|
|
|
|
Plugins/ImageCodecPlugin.cpp
|
2024-06-29 22:24:01 -06:00
|
|
|
Process.cpp
|
2024-11-10 09:53:15 -05:00
|
|
|
ProcessHandle.cpp
|
2024-03-25 18:29:14 -06:00
|
|
|
ProcessManager.cpp
|
2023-10-19 15:50:39 -04:00
|
|
|
SearchEngine.cpp
|
2025-03-20 12:59:44 -04:00
|
|
|
Settings.cpp
|
2025-03-09 11:40:34 -04:00
|
|
|
SiteIsolation.cpp
|
2023-08-28 14:47:29 -04:00
|
|
|
SourceHighlighter.cpp
|
2025-06-08 23:35:46 +02:00
|
|
|
StorageJar.cpp
|
2023-10-13 09:43:16 -04:00
|
|
|
URL.cpp
|
2023-09-11 17:49:57 +04:00
|
|
|
UserAgent.cpp
|
2024-11-10 10:26:07 -05:00
|
|
|
Utilities.cpp
|
2023-01-12 19:27:17 +00:00
|
|
|
ViewImplementation.cpp
|
2022-04-30 10:46:33 +02:00
|
|
|
WebContentClient.cpp
|
2025-03-24 09:27:36 -04:00
|
|
|
WebUI.cpp
|
2025-03-24 09:50:12 -04:00
|
|
|
WebUI/ProcessesUI.cpp
|
2025-03-24 10:22:38 -04:00
|
|
|
WebUI/SettingsUI.cpp
|
2022-04-30 10:46:33 +02:00
|
|
|
)
|
|
|
|
|
2024-11-10 10:26:07 -05:00
|
|
|
if (APPLE)
|
|
|
|
list(APPEND SOURCES MachPortServer.cpp)
|
|
|
|
endif()
|
|
|
|
|
2023-10-14 09:07:38 -04:00
|
|
|
set(GENERATED_SOURCES ${CURRENT_LIB_GENERATED})
|
|
|
|
|
2024-08-22 12:42:12 +01:00
|
|
|
embed_as_string(
|
2023-08-24 11:01:09 +01:00
|
|
|
"NativeStyleSheetSource.cpp"
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/Native.css"
|
|
|
|
"NativeStyleSheetSource.cpp"
|
|
|
|
"native_stylesheet_source"
|
|
|
|
NAMESPACE "WebView"
|
|
|
|
)
|
|
|
|
|
2024-04-26 15:20:30 -06:00
|
|
|
compile_ipc(UIProcessServer.ipc UIProcessServerEndpoint.h)
|
|
|
|
compile_ipc(UIProcessClient.ipc UIProcessClientEndpoint.h)
|
|
|
|
|
2024-11-10 10:26:07 -05:00
|
|
|
if (NOT APPLE AND NOT CMAKE_INSTALL_LIBEXECDIR STREQUAL "libexec")
|
|
|
|
set_source_files_properties(Utilities.cpp PROPERTIES COMPILE_DEFINITIONS LADYBIRD_LIBEXECDIR="${CMAKE_INSTALL_LIBEXECDIR}")
|
|
|
|
endif()
|
|
|
|
|
2022-04-30 10:46:33 +02:00
|
|
|
set(GENERATED_SOURCES
|
2024-02-23 11:59:11 -07:00
|
|
|
${GENERATED_SOURCES}
|
2024-11-09 12:25:08 -05:00
|
|
|
../../Services/RequestServer/RequestClientEndpoint.h
|
|
|
|
../../Services/RequestServer/RequestServerEndpoint.h
|
|
|
|
../../Services/WebContent/WebContentClientEndpoint.h
|
|
|
|
../../Services/WebContent/WebContentServerEndpoint.h
|
|
|
|
../../Services/WebContent/WebDriverClientEndpoint.h
|
|
|
|
../../Services/WebContent/WebDriverServerEndpoint.h
|
2025-03-24 09:27:36 -04:00
|
|
|
../../Services/WebContent/WebUIClientEndpoint.h
|
|
|
|
../../Services/WebContent/WebUIServerEndpoint.h
|
2023-08-24 11:01:09 +01:00
|
|
|
NativeStyleSheetSource.cpp
|
2024-04-26 15:20:30 -06:00
|
|
|
UIProcessClientEndpoint.h
|
|
|
|
UIProcessServerEndpoint.h
|
2022-04-30 10:46:33 +02:00
|
|
|
)
|
|
|
|
|
2025-06-30 08:11:44 -07:00
|
|
|
ladybird_lib(LibWebView webview)
|
2025-04-16 17:35:24 -04:00
|
|
|
target_link_libraries(LibWebView PRIVATE LibCore LibDevTools LibFileSystem LibGfx LibImageDecoderClient LibIPC LibRequests LibJS LibWeb LibUnicode LibURL LibSyntax LibTextCodec)
|
2023-08-30 07:27:45 -04:00
|
|
|
|
2024-11-10 10:26:07 -05:00
|
|
|
if (APPLE)
|
|
|
|
target_link_libraries(LibWebView PRIVATE LibThreading)
|
|
|
|
endif()
|
|
|
|
|
2024-06-24 13:08:41 -06:00
|
|
|
# Third-party
|
2024-06-04 16:28:35 -04:00
|
|
|
find_package(SQLite3 REQUIRED)
|
2024-06-24 13:08:41 -06:00
|
|
|
target_link_libraries(LibWebView PRIVATE SQLite::SQLite3)
|
2024-06-04 16:28:35 -04:00
|
|
|
|
2024-11-10 09:53:15 -05:00
|
|
|
if (HAS_FONTCONFIG)
|
|
|
|
target_link_libraries(LibWebView PRIVATE Fontconfig::Fontconfig)
|
|
|
|
endif()
|
|
|
|
|
2025-07-06 10:55:16 -06:00
|
|
|
add_library(LibWebViewPlatform INTERFACE)
|
|
|
|
if (ENABLE_QT)
|
|
|
|
add_library(LibWebViewQt STATIC
|
|
|
|
EventLoop/EventLoopImplementationQt.cpp
|
|
|
|
EventLoop/EventLoopImplementationQtEventTarget.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set_target_properties(LibWebViewQt PROPERTIES AUTOMOC ON AUTORCC OFF AUTOUIC OFF)
|
|
|
|
find_package(Qt6 REQUIRED COMPONENTS Core)
|
|
|
|
target_link_libraries(LibWebViewQt PUBLIC Qt::Core)
|
|
|
|
target_link_libraries(LibWebViewPlatform INTERFACE LibWebViewQt)
|
|
|
|
elseif (APPLE)
|
|
|
|
add_library(LibWebViewCocoa STATIC
|
|
|
|
EventLoop/EventLoopImplementationMacOS.mm
|
|
|
|
)
|
|
|
|
target_link_libraries(LibWebViewCocoa PUBLIC "-framework Cocoa")
|
|
|
|
target_link_libraries(LibWebViewPlatform INTERFACE LibWebViewCocoa)
|
|
|
|
endif()
|
|
|
|
|
2024-07-20 19:03:24 +02:00
|
|
|
if (ENABLE_INSTALL_HEADERS)
|
|
|
|
foreach(header ${GENERATED_SOURCES})
|
|
|
|
get_filename_component(extension ${header} EXT)
|
|
|
|
if (NOT "${extension}" STREQUAL ".h")
|
|
|
|
continue()
|
|
|
|
endif()
|
2023-08-30 07:27:45 -04:00
|
|
|
|
2024-07-20 19:03:24 +02:00
|
|
|
get_filename_component(subdirectory ${header} DIRECTORY)
|
|
|
|
string(REGEX REPLACE "^\\.\\./\\.\\./" "" subdirectory "${subdirectory}")
|
2023-08-30 07:27:45 -04:00
|
|
|
|
2024-07-20 19:03:24 +02:00
|
|
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${header}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${subdirectory}")
|
|
|
|
endforeach()
|
|
|
|
endif()
|