From 996084cf5d0d9d69f406e79b466e089e99e638ce Mon Sep 17 00:00:00 2001 From: DarthM Date: Mon, 14 Sep 2026 16:39:38 -0400 Subject: [PATCH 1/3] fix building on apple silicon --- runtime/cmake/PublicProducts.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/runtime/cmake/PublicProducts.cmake b/runtime/cmake/PublicProducts.cmake index 98ce39a4a..2bf42999b 100644 --- a/runtime/cmake/PublicProducts.cmake +++ b/runtime/cmake/PublicProducts.cmake @@ -84,11 +84,18 @@ target_link_libraries(mkw_runtime_common PRIVATE target_link_libraries(mkw_runtime_common PRIVATE mkw_platform mkw::pugixml mkw::toml11 mkw::cryptopp) if(MKW_PLATFORM_WINDOWS) target_link_libraries(mkw_runtime_common PRIVATE shell32 windowsapp) +elseif(MKW_PLATFORM_MACOS) + target_link_libraries(mkw_runtime_common PRIVATE "${MKW_COREAUDIO_FRAMEWORK}") elseif(MKW_PLATFORM_LINUX OR MKW_PLATFORM_MACOS_X86_64) + # libco is used by Linux and Intel macOS. Apple Silicon uses the local + # x18-safe assembly backend and therefore does not define mkw::libco. # ${CMAKE_DL_LIBS} for music_attenuation.cpp's dlopen of libdbus-1 (MPRIS # media monitoring). Empty on platforms where dl* is already in libc/libSystem. target_link_libraries(mkw_runtime_common PRIVATE mkw::libco ${CMAKE_DL_LIBS}) endif() + + target_link_libraries(mkw_runtime_common PRIVATE mkw::libco ${CMAKE_DL_LIBS}) +endif() if(MKW_CPPWINRT_INCLUDE_DIR) if(NOT EXISTS "${MKW_CPPWINRT_INCLUDE_DIR}/winrt/base.h") message(FATAL_ERROR From d278cb7fd5e58abe6a13644dc0509d540770d108 Mon Sep 17 00:00:00 2001 From: DarthM Date: Mon, 14 Sep 2026 18:39:25 -0400 Subject: [PATCH 2/3] Update PublicProducts.cmake --- runtime/cmake/PublicProducts.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/runtime/cmake/PublicProducts.cmake b/runtime/cmake/PublicProducts.cmake index 2bf42999b..2e056a524 100644 --- a/runtime/cmake/PublicProducts.cmake +++ b/runtime/cmake/PublicProducts.cmake @@ -94,8 +94,6 @@ elseif(MKW_PLATFORM_LINUX OR MKW_PLATFORM_MACOS_X86_64) target_link_libraries(mkw_runtime_common PRIVATE mkw::libco ${CMAKE_DL_LIBS}) endif() - target_link_libraries(mkw_runtime_common PRIVATE mkw::libco ${CMAKE_DL_LIBS}) -endif() if(MKW_CPPWINRT_INCLUDE_DIR) if(NOT EXISTS "${MKW_CPPWINRT_INCLUDE_DIR}/winrt/base.h") message(FATAL_ERROR From bb806bac5a4608ef74fe2117a89eb11ca4642816 Mon Sep 17 00:00:00 2001 From: Michael G <10155689+DarthMDev@users.noreply.github.com> Date: Mon, 14 Sep 2026 18:49:40 -0400 Subject: [PATCH 3/3] Remove macOS library linking from CMake Removed macOS specific library linking for mkw_runtime_common. --- runtime/cmake/PublicProducts.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/runtime/cmake/PublicProducts.cmake b/runtime/cmake/PublicProducts.cmake index 2e056a524..99032b6bd 100644 --- a/runtime/cmake/PublicProducts.cmake +++ b/runtime/cmake/PublicProducts.cmake @@ -84,8 +84,6 @@ target_link_libraries(mkw_runtime_common PRIVATE target_link_libraries(mkw_runtime_common PRIVATE mkw_platform mkw::pugixml mkw::toml11 mkw::cryptopp) if(MKW_PLATFORM_WINDOWS) target_link_libraries(mkw_runtime_common PRIVATE shell32 windowsapp) -elseif(MKW_PLATFORM_MACOS) - target_link_libraries(mkw_runtime_common PRIVATE "${MKW_COREAUDIO_FRAMEWORK}") elseif(MKW_PLATFORM_LINUX OR MKW_PLATFORM_MACOS_X86_64) # libco is used by Linux and Intel macOS. Apple Silicon uses the local # x18-safe assembly backend and therefore does not define mkw::libco.