1
0
Fork 0

Revert "Add DESKTOP_APP_USE_PACKAGED_FFMPEG_STATIC option"

This reverts commit 85759739eb.

I don't need this hack anymore since it doesn't work with Big Sur GitHub actions and I know anyone who uses it
This commit is contained in:
Ilya Fedin 2021-12-12 18:07:09 +04:00 committed by John Preston
parent 651362c922
commit 19381f859c
3 changed files with 9 additions and 50 deletions

View file

@ -16,25 +16,6 @@ if (DESKTOP_APP_USE_PACKAGED)
pkg_check_modules(SWSCALE REQUIRED IMPORTED_TARGET libswscale)
pkg_check_modules(SWRESAMPLE REQUIRED IMPORTED_TARGET libswresample)
if (DESKTOP_APP_USE_PACKAGED_FFMPEG_STATIC)
target_include_directories(external_ffmpeg SYSTEM
INTERFACE
${AVCODEC_STATIC_INCLUDE_DIRS}
${AVFORMAT_STATIC_INCLUDE_DIRS}
${AVUTIL_STATIC_INCLUDE_DIRS}
${SWSCALE_STATIC_INCLUDE_DIRS}
${SWRESAMPLE_STATIC_INCLUDE_DIRS}
)
target_link_static_libraries(external_ffmpeg IGNORE_NONEXISTING
INTERFACE
${AVCODEC_STATIC_LIBRARIES}
${AVFORMAT_STATIC_LIBRARIES}
${AVUTIL_STATIC_LIBRARIES}
${SWSCALE_STATIC_LIBRARIES}
${SWRESAMPLE_STATIC_LIBRARIES}
)
else()
target_link_libraries(external_ffmpeg
INTERFACE
PkgConfig::AVCODEC
@ -43,7 +24,6 @@ if (DESKTOP_APP_USE_PACKAGED)
PkgConfig::SWSCALE
PkgConfig::SWRESAMPLE
)
endif()
else()
target_include_directories(external_ffmpeg SYSTEM
INTERFACE

View file

@ -12,35 +12,15 @@ function(target_link_static_libraries target_name)
set(private_libs "")
set(public_libs "")
set(interface_libs "")
set(ignore_nonexisting 0)
set(ignored_libs "")
foreach (entry ${list})
if (${entry} STREQUAL "PRIVATE" OR ${entry} STREQUAL "PUBLIC" OR ${entry} STREQUAL "INTERFACE")
set(writing_now ${entry})
elseif (${entry} STREQUAL "IGNORE_NONEXISTING")
set(ignore_nonexisting 1)
else()
find_library(static_lib_${entry} lib${entry}.a)
set(full_path "${static_lib_${entry}}")
if (${full_path} STREQUAL static_lib_${entry}-NOTFOUND)
if (ignore_nonexisting)
if (NOT entry IN_LIST ignored_libs)
message(VERBOSE "Could not find static library lib${entry}.a, using shared one...")
list(APPEND ignored_libs ${entry})
endif()
if (APPLE)
find_library(shared_lib_${entry} lib${entry}.dylib)
set(full_path "${shared_lib_${entry}}")
if (${full_path} STREQUAL shared_lib_${entry}-NOTFOUND)
message(FATAL_ERROR "Could not find shared library lib${entry}.dylib")
endif()
else()
set(full_path ${entry})
endif()
else()
message(FATAL_ERROR "Could not find static library lib${entry}.a")
endif()
endif()
if ("${writing_now}" STREQUAL "PRIVATE")
list(APPEND private_libs ${full_path})
elseif ("${writing_now}" STREQUAL "PUBLIC")

View file

@ -23,7 +23,6 @@ option(DESKTOP_APP_DISABLE_X11_INTEGRATION "Disable all code for X11 integration
option(DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION "Disable all code for Wayland integration (Linux only)." OFF)
option(DESKTOP_APP_USE_ALLOCATION_TRACER "Use simple allocation tracer (Linux only)." OFF)
option(DESKTOP_APP_USE_PACKAGED_LAZY "Bundle recommended Qt plugins for self-contained packages. (Linux only)" OFF)
option(DESKTOP_APP_USE_PACKAGED_FFMPEG_STATIC "Link ffmpeg statically in packaged mode." OFF)
option(DESKTOP_APP_DISABLE_SPELLCHECK "Disable spellcheck library." OFF)
option(DESKTOP_APP_DISABLE_CRASH_REPORTS "Disable crash report generation." ${no_special_target})
option(DESKTOP_APP_DISABLE_AUTOUPDATE "Disable autoupdate." ${disable_autoupdate})