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-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
|
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
|
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
|
2022-04-30 10:46:33 +02:00
|
|
|
)
|
|
|
|
|
2024-11-10 10:26:07 -05:00
|
|
|
if (APPLE)
|
|
|
|
list(APPEND SOURCES MachPortServer.cpp)
|
|
|
|
endif()
|
|
|
|
|
2024-11-10 09:23:10 -05:00
|
|
|
if (ENABLE_QT)
|
|
|
|
list(APPEND SOURCES
|
|
|
|
EventLoop/EventLoopImplementationQt.cpp
|
|
|
|
EventLoop/EventLoopImplementationQtEventTarget.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
find_package(Qt6 REQUIRED COMPONENTS Core)
|
|
|
|
elseif (APPLE)
|
|
|
|
list(APPEND SOURCES
|
|
|
|
EventLoop/EventLoopImplementationMacOS.mm
|
|
|
|
)
|
|
|
|
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
|
|
|
)
|
|
|
|
|
|
|
|
serenity_lib(LibWebView webview)
|
2025-02-15 08:09:47 -05:00
|
|
|
target_link_libraries(LibWebView PRIVATE LibCore LibDevTools LibFileSystem LibGfx LibImageDecoderClient LibIPC LibRequests LibJS LibWeb LibUnicode LibURL LibSyntax)
|
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:23:10 -05:00
|
|
|
if (ENABLE_QT)
|
|
|
|
target_link_libraries(LibWebView PRIVATE Qt::Core)
|
|
|
|
elseif (APPLE)
|
|
|
|
target_link_libraries(LibWebView PRIVATE "-framework Cocoa")
|
|
|
|
endif()
|
|
|
|
|
2024-11-10 09:53:15 -05:00
|
|
|
if (HAS_FONTCONFIG)
|
|
|
|
target_link_libraries(LibWebView PRIVATE Fontconfig::Fontconfig)
|
|
|
|
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()
|