Use libuv run loop implementation on macOS (#3546)

This commit is contained in:
Bart Louwers
2025-06-11 21:39:25 +02:00
committed by GitHub
parent 7fa809449b
commit 1e78e146f1
3 changed files with 25 additions and 5 deletions

View File

@@ -12,10 +12,31 @@ target_link_libraries(
z
)
if(MLN_DARWIN_USE_LIBUV)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBUV REQUIRED IMPORTED_TARGET libuv)
target_link_libraries(mbgl-core
PRIVATE
PkgConfig::LIBUV
)
endif()
target_sources(
mbgl-core
PRIVATE
${PROJECT_SOURCE_DIR}/platform/darwin/core/async_task.cpp
$<$<BOOL:${MLN_DARWIN_USE_LIBUV}>:
${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/async_task.cpp
${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/run_loop.cpp
${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/timer.cpp
>
$<$<NOT:$<BOOL:${MLN_DARWIN_USE_LIBUV}>>:
${PROJECT_SOURCE_DIR}/platform/darwin/core/async_task.cpp
${PROJECT_SOURCE_DIR}/platform/darwin/core/run_loop.cpp
${PROJECT_SOURCE_DIR}/platform/darwin/core/timer.cpp
>
${PROJECT_SOURCE_DIR}/platform/darwin/core/collator.mm
${PROJECT_SOURCE_DIR}/platform/darwin/core/http_file_source.mm
${PROJECT_SOURCE_DIR}/platform/darwin/core/image.mm
@@ -24,9 +45,7 @@ target_sources(
${PROJECT_SOURCE_DIR}/platform/darwin/core/native_apple_interface.m
${PROJECT_SOURCE_DIR}/platform/darwin/core/nsthread.mm
${PROJECT_SOURCE_DIR}/platform/darwin/core/number_format.mm
${PROJECT_SOURCE_DIR}/platform/darwin/core/run_loop.cpp
${PROJECT_SOURCE_DIR}/platform/darwin/core/string_nsstring.mm
${PROJECT_SOURCE_DIR}/platform/darwin/core/timer.cpp
${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/gfx/headless_backend.cpp
${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/gfx/headless_frontend.cpp
${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/layermanager/layer_manager.cpp