2022-10-05 16:23:41 +03:00
|
|
|
set(WEBCONTENT_SOURCE_DIR ${SERENITY_SOURCE_DIR}/Userland/Services/WebContent/)
|
|
|
|
|
|
|
|
set(WEBCONTENT_SOURCES
|
2022-10-08 02:08:29 +03:00
|
|
|
${WEBCONTENT_SOURCE_DIR}/ConnectionFromClient.cpp
|
2022-12-09 22:51:10 +03:00
|
|
|
${WEBCONTENT_SOURCE_DIR}/ConsoleGlobalEnvironmentExtensions.cpp
|
2022-10-08 02:08:29 +03:00
|
|
|
${WEBCONTENT_SOURCE_DIR}/PageHost.cpp
|
|
|
|
${WEBCONTENT_SOURCE_DIR}/WebContentConsoleClient.cpp
|
2022-11-09 06:00:12 +03:00
|
|
|
${WEBCONTENT_SOURCE_DIR}/WebDriverConnection.cpp
|
2023-08-02 21:01:17 +03:00
|
|
|
../FontPlugin.cpp
|
2023-08-01 23:39:19 +03:00
|
|
|
../HelperProcess.cpp
|
2023-08-02 21:01:17 +03:00
|
|
|
../ImageCodecPlugin.cpp
|
2022-10-05 16:23:41 +03:00
|
|
|
../Utilities.cpp
|
2022-10-08 02:08:29 +03:00
|
|
|
)
|
2022-10-05 16:23:41 +03:00
|
|
|
|
2023-08-08 04:42:06 +03:00
|
|
|
if (ENABLE_QT)
|
|
|
|
qt_add_executable(WebContent ${WEBCONTENT_SOURCES})
|
|
|
|
target_sources(WebContent PRIVATE
|
|
|
|
../Qt/AudioCodecPluginQt.cpp
|
|
|
|
../Qt/AudioThread.cpp
|
|
|
|
../Qt/EventLoopImplementationQt.cpp
|
|
|
|
../Qt/EventLoopImplementationQtEventTarget.cpp
|
|
|
|
../Qt/RequestManagerQt.cpp
|
|
|
|
../Qt/StringUtils.cpp
|
|
|
|
../Qt/WebSocketClientManagerQt.cpp
|
|
|
|
../Qt/WebSocketQt.cpp
|
|
|
|
../Qt/WebSocketImplQt.cpp
|
2023-08-12 03:26:17 +03:00
|
|
|
main.cpp
|
2023-08-08 04:42:06 +03:00
|
|
|
)
|
|
|
|
target_link_libraries(WebContent PRIVATE Qt::Core Qt::Network Qt::Multimedia)
|
|
|
|
target_compile_definitions(WebContent PRIVATE HAVE_QT=1)
|
|
|
|
else()
|
2023-09-07 01:42:16 +03:00
|
|
|
set(LIB_TYPE STATIC)
|
|
|
|
if (ANDROID)
|
|
|
|
set(LIB_TYPE SHARED)
|
|
|
|
endif()
|
|
|
|
add_library(webcontent ${LIB_TYPE} ${WEBCONTENT_SOURCES})
|
2023-08-12 03:26:17 +03:00
|
|
|
target_include_directories(webcontent PRIVATE ${SERENITY_SOURCE_DIR}/Userland/Services/)
|
|
|
|
target_include_directories(webcontent PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/..)
|
2023-08-31 14:30:30 +03:00
|
|
|
target_link_libraries(webcontent PRIVATE LibAudio LibCore LibFileSystem LibGfx LibIPC LibJS LibMain LibWeb LibWebSocket LibProtocol LibWebView)
|
2023-08-12 04:38:31 +03:00
|
|
|
target_sources(webcontent PUBLIC FILE_SET ladybird TYPE HEADERS
|
|
|
|
BASE_DIRS ${SERENITY_SOURCE_DIR}
|
|
|
|
FILES ../FontPlugin.h
|
|
|
|
../ImageCodecPlugin.h
|
|
|
|
)
|
|
|
|
target_sources(webcontent PUBLIC FILE_SET server TYPE HEADERS
|
|
|
|
BASE_DIRS ${SERENITY_SOURCE_DIR}/Userland/Services
|
|
|
|
FILES ${WEBCONTENT_SOURCE_DIR}/ConnectionFromClient.h
|
|
|
|
${WEBCONTENT_SOURCE_DIR}/ConsoleGlobalEnvironmentExtensions.h
|
|
|
|
${WEBCONTENT_SOURCE_DIR}/Forward.h
|
|
|
|
${WEBCONTENT_SOURCE_DIR}/PageHost.h
|
|
|
|
${WEBCONTENT_SOURCE_DIR}/WebContentConsoleClient.h
|
|
|
|
${WEBCONTENT_SOURCE_DIR}/WebDriverConnection.h
|
|
|
|
)
|
2023-08-12 03:26:17 +03:00
|
|
|
|
2023-09-07 01:42:16 +03:00
|
|
|
if (ANDROID)
|
2023-09-09 07:12:42 +03:00
|
|
|
target_sources(webcontent PRIVATE
|
|
|
|
../Android/src/main/cpp/WebContentService.cpp
|
2023-09-16 03:01:23 +03:00
|
|
|
../Android/src/main/cpp/WebContentServiceJNI.cpp
|
2023-09-16 00:09:01 +03:00
|
|
|
../Android/src/main/cpp/LadybirdServiceBaseJNI.cpp
|
2023-09-24 08:05:15 +03:00
|
|
|
../Android/src/main/cpp/JNIHelpers.cpp
|
2023-09-09 07:12:42 +03:00
|
|
|
)
|
2023-09-15 21:35:20 +03:00
|
|
|
target_link_libraries(webcontent PRIVATE android)
|
2023-09-07 01:42:16 +03:00
|
|
|
endif()
|
|
|
|
|
2023-08-12 03:26:17 +03:00
|
|
|
add_executable(WebContent main.cpp)
|
|
|
|
target_link_libraries(WebContent PRIVATE webcontent)
|
2023-08-08 04:42:06 +03:00
|
|
|
endif()
|
2022-10-05 16:23:41 +03:00
|
|
|
|
|
|
|
target_include_directories(WebContent PRIVATE ${SERENITY_SOURCE_DIR}/Userland/Services/)
|
|
|
|
target_include_directories(WebContent PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/..)
|
2023-09-08 13:30:50 +03:00
|
|
|
target_link_libraries(WebContent PRIVATE LibAudio LibCore LibFileSystem LibGfx LibImageDecoderClient LibIPC LibJS LibMain LibWeb LibWebSocket LibProtocol LibWebView)
|
2023-07-04 13:02:19 +03:00
|
|
|
|
|
|
|
if (HAVE_PULSEAUDIO)
|
|
|
|
target_compile_definitions(WebContent PRIVATE HAVE_PULSEAUDIO=1)
|
2023-08-12 03:26:17 +03:00
|
|
|
if (TARGET webcontent)
|
|
|
|
target_compile_definitions(webcontent PRIVATE HAVE_PULSEAUDIO=1)
|
|
|
|
endif()
|
2023-07-04 13:02:19 +03:00
|
|
|
endif()
|