Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build using system ffmpeg when ffmpeg include dirs are empty and fix undefined reference to boost::log #1522

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CMakeModules/Bootstrap_Linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MARK_AS_ADVANCED (CMAKE_INSTALL_PREFIX)
if (USE_STATIC_BOOST)
SET (Boost_USE_STATIC_LIBS ON)
endif()
FIND_PACKAGE (Boost 1.67.0 COMPONENTS system thread chrono filesystem log locale regex date_time coroutine REQUIRED)
FIND_PACKAGE (Boost 1.67.0 COMPONENTS system thread chrono filesystem log_setup log locale regex date_time coroutine REQUIRED)

if (NOT USE_SYSTEM_FFMPEG)
FetchContent_Declare(
Expand Down
12 changes: 10 additions & 2 deletions src/CMakeModules/FindFFmpeg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,17 @@ foreach (_component AVCODEC AVDEVICE AVFORMAT AVUTIL POSTPROCESS SWSCALE)
endforeach ()

# Compile the list of required vars
set(_FFmpeg_REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS)
if (FFMPEG_INCLUDE_DIRS)
set(_FFmpeg_REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS)
else ()
set(_FFmpeg_REQUIRED_VARS FFMPEG_LIBRARIES)
endif ()
foreach (_component ${FFmpeg_FIND_COMPONENTS})
list(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES ${_component}_INCLUDE_DIRS)
if (${_component}_INCLUDE_DIRS)
list(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES ${_component}_INCLUDE_DIRS)
else ()
list(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES)
endif ()
endforeach ()

# Give a nice error message if some of the required vars are missing.
Expand Down