From 39d73c0b64947744f9add5193186ee3167bdd0a4 Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Thu, 30 Oct 2025 21:05:32 -0600 Subject: [PATCH 1/3] cmake: fix use script errors (string vs list, want list) --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 58b5948ce22ee..ca0dbaecd9a7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,6 @@ string(JOIN "\n" EXT1 "# https://github.com/FFmpeg/FFmpeg/blob/n2.6.2/configure#L2667-L2675" "# TRICKY ffmpeg_all_libs used by FFmpeg-targets.cmake" "set(ffmpeg_all_libs ${libs})" - "string(REPLACE \";\" \" \" ffmpeg_all_libs \"\${ffmpeg_all_libs}\")" "# FFMPEG_LIBRARIES - the FFmpeg libraries" "set(FFMPEG_LIBRARIES \${ffmpeg_all_libs})" "list(TRANSFORM FFMPEG_LIBRARIES PREPEND ffmpeg::)" @@ -36,7 +35,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") string(JOIN "\n" EXT3 "# FFMPEG_DLLNAMES - the FFmpeg shared object names (dll, so)" "set(FFMPEG_DLLNAMES ${dlls})" - "string(REPLACE \";\" \" \" FFMPEG_DLLNAMES \"\${FFMPEG_DLLNAMES}\")" "# FFMPEG_DLLS - the full path to FFmpeg shared objects (dll, so)" "set(FFMPEG_DLLS \${FFMPEG_DLLNAMES})" "list(TRANSFORM FFMPEG_DLLS PREPEND \${XP_ROOTDIR}/${CMAKE_INSTALL_BINDIR}/)" From d024166ae3f23f78120e47907c519d1bd81c9f50 Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Thu, 30 Oct 2025 21:06:11 -0600 Subject: [PATCH 2/3] cmake: install bin/ directory with USE_SOURCE_PERMISSIONS for exe's --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca0dbaecd9a7e..dd00c76e856b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,7 @@ else() INSTALL_COMMAND # use default ) ExternalProject_Get_Property(${PROJECT_NAME} INSTALL_DIR) - install(DIRECTORY ${INSTALL_DIR}/bin/ DESTINATION ${CMAKE_INSTALL_BINDIR}) + install(DIRECTORY ${INSTALL_DIR}/bin/ DESTINATION ${CMAKE_INSTALL_BINDIR} USE_SOURCE_PERMISSIONS) install(DIRECTORY ${INSTALL_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${prj}) list(TRANSFORM libs PREPEND "${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}") list(TRANSFORM libs APPEND "${CMAKE_STATIC_LIBRARY_SUFFIX}") From 85fed874f9b113c973a5c8f9287d2bc78c2edba6 Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Thu, 30 Oct 2025 21:07:07 -0600 Subject: [PATCH 3/3] cmake/FFmpeg-targets: avdevice requires macOS frameworks --- cmake/FFmpeg-targets.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmake/FFmpeg-targets.cmake b/cmake/FFmpeg-targets.cmake index 3ad27ef867633..a3fc7fb09b711 100644 --- a/cmake/FFmpeg-targets.cmake +++ b/cmake/FFmpeg-targets.cmake @@ -14,6 +14,20 @@ xpGetPkgVar(openh264 LIBRARIES) # sets OPENH264_LIBRARIES set(_ffmpeg_avcodec_libs ${OPENH264_LIBRARIES}) # _ffmpeg_*_deps set(_ffmpeg_avdevice_deps avfilter avformat) +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + find_library(Cocoa_LIB Cocoa) + find_library(AVFoundation_LIB AVFoundation) + find_library(CoreMedia_LIB CoreMedia) + find_library(VideoDecodeAcceleration_LIB VideoDecodeAcceleration) + find_library(QuartzCore_LIB QuartzCore) + set(_ffmpeg_avdevice_libs + ${Cocoa_LIB} + ${AVFoundation_LIB} + ${CoreMedia_LIB} + ${VideoDecodeAcceleration_LIB} + ${QuartzCore_LIB} + ) +endif() set(_ffmpeg_avfilter_deps avcodec swresample swscale) # libavfilter code calls swr_*, sws_* functions set(_ffmpeg_avformat_deps avcodec) set(_ffmpeg_avcodec_deps swresample) # libavcodec code calls swr_* functions