From a61237f265261ffc08d9ead7f880e055e37c7f11 Mon Sep 17 00:00:00 2001 From: Andrew Dunn Date: Thu, 18 Aug 2022 00:22:46 +1000 Subject: [PATCH] Cleaned up macOS FFmpeg framework linking I'm not sure why but CoreMedia, VideoToolbox, and AudioToolbox aren't being found by find_library, so I've converted framework imports to a standard link option. I really don't think this will be an issue given that this change will only ever apply to Apple platforms. --- apps/openmw/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 9b483c0278..13fb717147 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -221,12 +221,12 @@ if(APPLE) target_link_libraries(openmw ${COCOA_FRAMEWORK} ${IOKIT_FRAMEWORK}) if (FFmpeg_FOUND) - find_library(COREVIDEO_FRAMEWORK CoreVideo) - find_library(VDA_FRAMEWORK VideoDecodeAcceleration) - target_link_libraries(openmw z ${COREVIDEO_FRAMEWORK} ${VDA_FRAMEWORK} - "-framework VideoToolbox" - "-framework AudioToolbox" - "-framework CoreMedia") + target_link_libraries(openmw z) + target_link_options(openmw PRIVATE "LINKER:SHELL:-framework CoreVideo" + "LINKER:SHELL:-framework CoreMedia" + "LINKER:SHELL:-framework VideoToolbox" + "LINKER:SHELL:-framework AudioToolbox" + "LINKER:SHELL:-framework VideoDecodeAcceleration") endif() endif(APPLE)