From ab9fc5b7fdd2e89a107a007727b643d52e5145ca Mon Sep 17 00:00:00 2001 From: lizzie Date: Thu, 22 Jan 2026 18:21:16 +0000 Subject: [PATCH] [cmake, macos] use CMAKE_SOURCE_DIR instead of relative icon paths; link to IOPS Signed-off-by: lizzie --- CMakeLists.txt | 2 ++ src/common/CMakeLists.txt | 6 ++++++ src/yuzu/CMakeLists.txt | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f1bd5d75b4..906d917d4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -190,6 +190,8 @@ cmake_dependent_option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MS option(ENABLE_CUBEB "Enables the cubeb audio backend" ON) +# See https://github.com/llvm/llvm-project/issues/123946 +# OpenBSD va_list doesn't play nice with precompiled headers set(EXT_DEFAULT OFF) if (MSVC OR ANDROID) set(EXT_DEFAULT ON) diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 3d09c1caea..d1d644667c 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -263,4 +263,10 @@ if(ANDROID) target_link_libraries(common PRIVATE android) endif() +# IOPS (needed for power state) requires linking to IOKit +if (APPLE) + find_library(IOKIT_LIBRARY IOKit REQUIRED) + target_link_libraries(common PRIVATE ${IOKIT_LIBRARY}) +endif() + create_target_directory_groups(common) diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 27911d2ac8..0d49e4a5e7 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -361,12 +361,12 @@ endif() if (APPLE) # Normal icns - set(MACOSX_ICON "../../dist/eden.icns") + set(MACOSX_ICON "${CMAKE_SOURCE_DIR}/dist/eden.icns") set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) target_sources(yuzu PRIVATE ${MACOSX_ICON}) # Liquid glass - set(MACOSX_LIQUID_GLASS_ICON "../../dist/Assets.car") + set(MACOSX_LIQUID_GLASS_ICON "${CMAKE_SOURCE_DIR}/dist/Assets.car") set_source_files_properties(${MACOSX_LIQUID_GLASS_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) target_sources(yuzu PRIVATE ${MACOSX_LIQUID_GLASS_ICON})