From b4151d4449bf7a2fa5398d9fbc649c6dc96e1052 Mon Sep 17 00:00:00 2001 From: der richter Date: Sun, 7 Sep 2025 20:58:07 +0200 Subject: [PATCH] meson: properly add path-mac.c to path_source and don't overwrite it path-mac.c was not properly set as path_source for macOS. it didn't lead to any errors because it was added to the normal source files. though in the case of tests and for certain setups the mac path symbols were not found. to fix that properly add path-mac.c to path_source (additional to path_darwin.c), remove it from the normal source files and don't overwrite it later with the posix or darwin path. this was overlooked in 9db8182 and #11374 --- meson.build | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index f49c0bc5e7..fc82cfe6d2 100644 --- a/meson.build +++ b/meson.build @@ -406,13 +406,18 @@ add_project_link_arguments(link_flags, language: ['c', 'cpp', 'objc']) # osdep +if darwin + path_source = files('osdep/path-darwin.c') + timer_source = files('osdep/timer-darwin.c') +endif + cocoa = dependency('appleframeworks', modules: ['Cocoa', 'IOKit', 'QuartzCore'], required: get_option('cocoa')) features += {'cocoa': cocoa.found()} if features['cocoa'] dependencies += cocoa + path_source += files('osdep/path-mac.m') sources += files('osdep/language-mac.c', - 'osdep/path-mac.m', 'osdep/utils-mac.c', 'osdep/mac/app_bridge.m', 'player/clipboard/clipboard-mac.m') @@ -420,7 +425,6 @@ if features['cocoa'] endif if posix - path_source = files('osdep/path-unix.c') if not get_option('fuzzers') and cc.has_function('fork', prefix : '#include ') sources += files('osdep/subprocess-posix.c') else @@ -437,12 +441,8 @@ if posix and not features['cocoa'] main_fn_source = files('osdep/main-fn-unix.c') endif -if darwin - path_source = files('osdep/path-darwin.c') - timer_source = files('osdep/timer-darwin.c') -endif - if posix and not darwin + path_source = files('osdep/path-unix.c') timer_source = files('osdep/timer-linux.c') endif