[cmake, macos] use CMAKE_SOURCE_DIR instead of relative icon paths; link to IOPS

Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie
2026-01-22 18:21:16 +00:00
parent a692986bd7
commit ab9fc5b7fd
3 changed files with 10 additions and 2 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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})