From 0e80ca651be49cb83ec92b91d034cf5fa2a50df9 Mon Sep 17 00:00:00 2001 From: Sebastian Emanuel Dawid Date: Thu, 13 Nov 2025 10:40:00 +0100 Subject: [PATCH] Create universal WebGPU library during project configuration on macOS --- examples/CMakeLists.txt | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 4e54e84b1..6fa0b4879 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -98,20 +98,8 @@ else () # macOS URL ${WEBGPU_URL} ) FetchContent_MakeAvailable(webgpu_other_bins) - - add_library(webgpu_other STATIC IMPORTED GLOBAL) set(WEBGPU_RUNTIME_LIB_OTHER "${webgpu_other_bins_SOURCE_DIR}/lib/${WEBGPU_LIBNAME}") - set_target_properties(webgpu_other PROPERTIES - IMPORTED_LOCATION "${WEBGPU_RUNTIME_LIB_OTHER}" - ) - target_include_directories(webgpu_other INTERFACE - "${webgpu_other_bins_SOURCE_DIR}/include" - "${webgpu_other_bins_SOURCE_DIR}/include/webgpu" - ) - - target_link_libraries(webgpu INTERFACE - webgpu_other - ) + execute_process(COMMAND lipo -create ${WEBGPU_RUNTIME_LIB} ${WEBGPU_RUNTIME_LIB_OTHER} -output ${WEBGPU_RUNTIME_LIB}) endif () add_executable(boing WIN32 MACOSX_BUNDLE boing.c ${ICON} ${GLAD_GL})