1
0
Fork 0

Don't require breakpad/ffmpeg build directories on Linux

This commit is contained in:
Ilya Fedin 2022-04-17 07:29:07 +04:00 committed by John Preston
parent ed1411f129
commit 8ca7ff8484
2 changed files with 39 additions and 14 deletions

View file

@ -7,10 +7,19 @@
add_library(external_breakpad INTERFACE IMPORTED GLOBAL) add_library(external_breakpad INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_breakpad ALIAS external_breakpad) add_library(desktop-app::external_breakpad ALIAS external_breakpad)
target_include_directories(external_breakpad SYSTEM if (LINUX)
INTERFACE find_package(PkgConfig REQUIRED)
pkg_check_modules(BREAKPAD REQUIRED breakpad)
target_include_directories(external_breakpad SYSTEM
INTERFACE
${BREAKPAD_INCLUDE_DIRS}
)
else()
target_include_directories(external_breakpad SYSTEM
INTERFACE
${libs_loc}/breakpad/src ${libs_loc}/breakpad/src
) )
endif()
if (build_win64) if (build_win64)
set(breakpad_config_add _x64) set(breakpad_config_add _x64)

View file

@ -25,13 +25,23 @@ if (DESKTOP_APP_USE_PACKAGED)
PkgConfig::SWRESAMPLE PkgConfig::SWRESAMPLE
) )
else() else()
if (LINUX)
target_link_static_libraries(external_ffmpeg
INTERFACE
avformat
avcodec
swresample
swscale
avutil
)
else()
set(ffmpeg_lib_loc ${libs_loc}/ffmpeg)
target_include_directories(external_ffmpeg SYSTEM target_include_directories(external_ffmpeg SYSTEM
INTERFACE INTERFACE
${libs_loc}/ffmpeg ${ffmpeg_lib_loc}
) )
set(ffmpeg_lib_loc ${libs_loc}/ffmpeg)
target_link_libraries(external_ffmpeg target_link_libraries(external_ffmpeg
INTERFACE INTERFACE
${ffmpeg_lib_loc}/libavformat/libavformat.a ${ffmpeg_lib_loc}/libavformat/libavformat.a
@ -39,11 +49,17 @@ else()
${ffmpeg_lib_loc}/libswresample/libswresample.a ${ffmpeg_lib_loc}/libswresample/libswresample.a
${ffmpeg_lib_loc}/libswscale/libswscale.a ${ffmpeg_lib_loc}/libswscale/libswscale.a
${ffmpeg_lib_loc}/libavutil/libavutil.a ${ffmpeg_lib_loc}/libavutil/libavutil.a
)
endif()
target_link_libraries(external_ffmpeg
INTERFACE
$<LINK_ONLY:desktop-app::external_opus> $<LINK_ONLY:desktop-app::external_opus>
$<TARGET_FILE:desktop-app::external_opus> $<TARGET_FILE:desktop-app::external_opus>
$<LINK_ONLY:desktop-app::external_vpx> $<LINK_ONLY:desktop-app::external_vpx>
$<TARGET_FILE:desktop-app::external_vpx> $<TARGET_FILE:desktop-app::external_vpx>
) )
if (APPLE) if (APPLE)
target_link_libraries(external_ffmpeg INTERFACE bz2) target_link_libraries(external_ffmpeg INTERFACE bz2)
elseif (LINUX) elseif (LINUX)