Skip to content

Commit 7dac9dc

Browse files
authored
Merge pull request #2 from externpro/fixes
fixes
2 parents c7592d5 + 85fed87 commit 7dac9dc

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ string(JOIN "\n" EXT1
1818
"# https://github.com/FFmpeg/FFmpeg/blob/n2.6.2/configure#L2667-L2675"
1919
"# TRICKY ffmpeg_all_libs used by FFmpeg-targets.cmake"
2020
"set(ffmpeg_all_libs ${libs})"
21-
"string(REPLACE \";\" \" \" ffmpeg_all_libs \"\${ffmpeg_all_libs}\")"
2221
"# FFMPEG_LIBRARIES - the FFmpeg libraries"
2322
"set(FFMPEG_LIBRARIES \${ffmpeg_all_libs})"
2423
"list(TRANSFORM FFMPEG_LIBRARIES PREPEND ffmpeg::)"
@@ -36,7 +35,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
3635
string(JOIN "\n" EXT3
3736
"# FFMPEG_DLLNAMES - the FFmpeg shared object names (dll, so)"
3837
"set(FFMPEG_DLLNAMES ${dlls})"
39-
"string(REPLACE \";\" \" \" FFMPEG_DLLNAMES \"\${FFMPEG_DLLNAMES}\")"
4038
"# FFMPEG_DLLS - the full path to FFmpeg shared objects (dll, so)"
4139
"set(FFMPEG_DLLS \${FFMPEG_DLLNAMES})"
4240
"list(TRANSFORM FFMPEG_DLLS PREPEND \${XP_ROOTDIR}/${CMAKE_INSTALL_BINDIR}/)"
@@ -87,7 +85,7 @@ else()
8785
INSTALL_COMMAND # use default
8886
)
8987
ExternalProject_Get_Property(${PROJECT_NAME} INSTALL_DIR)
90-
install(DIRECTORY ${INSTALL_DIR}/bin/ DESTINATION ${CMAKE_INSTALL_BINDIR})
88+
install(DIRECTORY ${INSTALL_DIR}/bin/ DESTINATION ${CMAKE_INSTALL_BINDIR} USE_SOURCE_PERMISSIONS)
9189
install(DIRECTORY ${INSTALL_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${prj})
9290
list(TRANSFORM libs PREPEND "${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}")
9391
list(TRANSFORM libs APPEND "${CMAKE_STATIC_LIBRARY_SUFFIX}")

cmake/FFmpeg-targets.cmake

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ xpGetPkgVar(openh264 LIBRARIES) # sets OPENH264_LIBRARIES
1414
set(_ffmpeg_avcodec_libs ${OPENH264_LIBRARIES})
1515
# _ffmpeg_*_deps
1616
set(_ffmpeg_avdevice_deps avfilter avformat)
17+
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
18+
find_library(Cocoa_LIB Cocoa)
19+
find_library(AVFoundation_LIB AVFoundation)
20+
find_library(CoreMedia_LIB CoreMedia)
21+
find_library(VideoDecodeAcceleration_LIB VideoDecodeAcceleration)
22+
find_library(QuartzCore_LIB QuartzCore)
23+
set(_ffmpeg_avdevice_libs
24+
${Cocoa_LIB}
25+
${AVFoundation_LIB}
26+
${CoreMedia_LIB}
27+
${VideoDecodeAcceleration_LIB}
28+
${QuartzCore_LIB}
29+
)
30+
endif()
1731
set(_ffmpeg_avfilter_deps avcodec swresample swscale) # libavfilter code calls swr_*, sws_* functions
1832
set(_ffmpeg_avformat_deps avcodec)
1933
set(_ffmpeg_avcodec_deps swresample) # libavcodec code calls swr_* functions

0 commit comments

Comments
 (0)