2024-11-10 14:53:15 +00:00
|
|
|
include(fontconfig)
|
|
|
|
include(public_suffix)
|
2023-10-14 13:07:38 +00:00
|
|
|
|
2022-04-30 08:46:33 +00:00
|
|
|
set(SOURCES
|
2024-06-30 04:24:01 +00:00
|
|
|
Application.cpp
|
2023-11-19 15:42:11 +00:00
|
|
|
Attribute.cpp
|
2024-04-26 21:20:30 +00:00
|
|
|
ChromeProcess.cpp
|
2023-08-31 11:07:07 +00:00
|
|
|
CookieJar.cpp
|
|
|
|
Database.cpp
|
2024-11-10 15:26:07 +00:00
|
|
|
HelperProcess.cpp
|
2023-11-23 17:26:38 +00:00
|
|
|
InspectorClient.cpp
|
2024-11-10 14:53:15 +00:00
|
|
|
Plugins/FontPlugin.cpp
|
|
|
|
Plugins/ImageCodecPlugin.cpp
|
2024-06-30 04:24:01 +00:00
|
|
|
Process.cpp
|
2024-11-10 14:53:15 +00:00
|
|
|
ProcessHandle.cpp
|
2024-03-26 00:29:14 +00:00
|
|
|
ProcessManager.cpp
|
2023-10-19 19:50:39 +00:00
|
|
|
SearchEngine.cpp
|
2023-08-28 18:47:29 +00:00
|
|
|
SourceHighlighter.cpp
|
2023-10-13 13:43:16 +00:00
|
|
|
URL.cpp
|
2023-09-11 13:49:57 +00:00
|
|
|
UserAgent.cpp
|
2024-11-10 15:26:07 +00:00
|
|
|
Utilities.cpp
|
2023-01-12 19:27:17 +00:00
|
|
|
ViewImplementation.cpp
|
2022-04-30 08:46:33 +00:00
|
|
|
WebContentClient.cpp
|
2023-10-14 13:07:38 +00:00
|
|
|
${PUBLIC_SUFFIX_SOURCES}
|
2022-04-30 08:46:33 +00:00
|
|
|
)
|
|
|
|
|
2024-11-10 15:26:07 +00:00
|
|
|
if (APPLE)
|
|
|
|
list(APPEND SOURCES MachPortServer.cpp)
|
|
|
|
endif()
|
|
|
|
|
2024-11-10 14:23:10 +00: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 13:07:38 +00:00
|
|
|
set(GENERATED_SOURCES ${CURRENT_LIB_GENERATED})
|
|
|
|
|
2024-08-22 11:42:12 +00:00
|
|
|
embed_as_string(
|
2023-08-24 10:01:09 +00:00
|
|
|
"NativeStyleSheetSource.cpp"
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/Native.css"
|
|
|
|
"NativeStyleSheetSource.cpp"
|
|
|
|
"native_stylesheet_source"
|
|
|
|
NAMESPACE "WebView"
|
|
|
|
)
|
|
|
|
|
2024-04-26 21:20:30 +00:00
|
|
|
compile_ipc(UIProcessServer.ipc UIProcessServerEndpoint.h)
|
|
|
|
compile_ipc(UIProcessClient.ipc UIProcessClientEndpoint.h)
|
|
|
|
|
2024-11-10 15:26:07 +00: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 08:46:33 +00:00
|
|
|
set(GENERATED_SOURCES
|
2024-02-23 18:59:11 +00:00
|
|
|
${GENERATED_SOURCES}
|
2024-11-09 17:25:08 +00: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
|
2023-08-24 10:01:09 +00:00
|
|
|
NativeStyleSheetSource.cpp
|
2024-04-26 21:20:30 +00:00
|
|
|
UIProcessClientEndpoint.h
|
|
|
|
UIProcessServerEndpoint.h
|
2022-04-30 08:46:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
serenity_lib(LibWebView webview)
|
2024-09-24 14:50:15 +00:00
|
|
|
target_link_libraries(LibWebView PRIVATE LibCore LibFileSystem LibGfx LibImageDecoderClient LibIPC LibRequests LibJS LibWeb LibUnicode LibURL LibSyntax)
|
2023-10-14 13:07:38 +00:00
|
|
|
target_compile_definitions(LibWebView PRIVATE ENABLE_PUBLIC_SUFFIX=$<BOOL:${ENABLE_PUBLIC_SUFFIX_DOWNLOAD}>)
|
2023-08-30 11:27:45 +00:00
|
|
|
|
2024-11-10 15:26:07 +00:00
|
|
|
if (APPLE)
|
|
|
|
target_link_libraries(LibWebView PRIVATE LibThreading)
|
|
|
|
endif()
|
|
|
|
|
2024-06-24 19:08:41 +00:00
|
|
|
# Third-party
|
2024-06-04 20:28:35 +00:00
|
|
|
find_package(SQLite3 REQUIRED)
|
2024-06-24 19:08:41 +00:00
|
|
|
target_link_libraries(LibWebView PRIVATE SQLite::SQLite3)
|
2024-06-04 20:28:35 +00:00
|
|
|
|
2024-11-10 14:23:10 +00:00
|
|
|
if (ENABLE_QT)
|
|
|
|
target_link_libraries(LibWebView PRIVATE Qt::Core)
|
|
|
|
elseif (APPLE)
|
|
|
|
target_link_libraries(LibWebView PRIVATE "-framework Cocoa")
|
|
|
|
endif()
|
|
|
|
|
2024-11-10 14:53:15 +00:00
|
|
|
if (HAS_FONTCONFIG)
|
|
|
|
target_link_libraries(LibWebView PRIVATE Fontconfig::Fontconfig)
|
|
|
|
endif()
|
|
|
|
|
2024-07-20 17:03:24 +00: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 11:27:45 +00:00
|
|
|
|
2024-07-20 17:03:24 +00:00
|
|
|
get_filename_component(subdirectory ${header} DIRECTORY)
|
|
|
|
string(REGEX REPLACE "^\\.\\./\\.\\./" "" subdirectory "${subdirectory}")
|
2023-08-30 11:27:45 +00:00
|
|
|
|
2024-07-20 17:03:24 +00:00
|
|
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${header}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${subdirectory}")
|
|
|
|
endforeach()
|
|
|
|
endif()
|