From 631f9e5bd1075f7ea5c9df08be305e8dedb2eac3 Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Mon, 3 Aug 2026 13:13:42 +0800 Subject: [PATCH] ci: link render backend plugins against oakengine-obj on Windows; switch runners - liboakengine.dll does not export engine-internal C++ symbols (olive::Renderer, FileFunctions, VideoParams, Texture), so oakgl.dll failed to link on Windows. Embed oakengine-obj instead (same pattern as the engine tests); MinGW's name-based RTTI keeps cross-DLL casts working. - ci.yml: move to warp runners --- .github/workflows/ci.yml | 2 +- engine/CMakeLists.txt | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19d03b571..423c8810b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-24.04, macos-15, windows-latest] + os: [warp-ubuntu-latest-x64-16x, warp-macos-15-arm64-12x, warp-windows-latest-x64-32x] env: CMAKE_BUILD_TYPE: Release CCACHE_DIR: ${{ github.workspace }}/.ccache diff --git a/engine/CMakeLists.txt b/engine/CMakeLists.txt index 9ce6f3dfc..edc3a0409 100644 --- a/engine/CMakeLists.txt +++ b/engine/CMakeLists.txt @@ -170,7 +170,15 @@ if (OAK_ENABLE_DYNAMIC_RENDER_BACKEND) render/opengl/openglrenderer.cpp render/opengl/openglrenderer.h ) - target_link_libraries(oakgl PRIVATE oakengine) + if (WIN32) + # Engine-internal C++ symbols (olive::Renderer, FileFunctions, ...) are + # not exported from liboakengine.dll; embed the object library like the + # engine tests do. MinGW compares type_info by name, so cross-DLL RTTI + # with the shared engine still works. + target_link_libraries(oakgl PRIVATE oakengine-obj) + else () + target_link_libraries(oakgl PRIVATE oakengine) + endif () if (COMMAND oak_copy_otio_runtime) oak_copy_otio_runtime(oakgl) endif() @@ -197,7 +205,12 @@ if (OAK_ENABLE_DYNAMIC_RENDER_BACKEND) render/vulkan/vulkanrenderer.cpp render/vulkan/vulkanrenderer.h ) - target_link_libraries(oakvulkan PRIVATE oakengine) + if (WIN32) + # Same as oakgl: embed the engine objects on Windows (see above). + target_link_libraries(oakvulkan PRIVATE oakengine-obj) + else () + target_link_libraries(oakvulkan PRIVATE oakengine) + endif () if (COMMAND oak_copy_otio_runtime) oak_copy_otio_runtime(oakvulkan) endif()