diff --git a/CMakeLists.txt b/CMakeLists.txt index 58b5948ce22ee..dd00c76e856b0 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}/)" @@ -87,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}") 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