Skip to content

Commit

Permalink
Work around the bug that aom.pc always has -lm
Browse files Browse the repository at this point in the history
Fix an issue introduced in
AOMediaCodec#2304 when libaom is built
locally in the ext/ directory. See
AOMediaCodec#2304 (review)
for more information.

Related to AOMediaCodec#2274.
  • Loading branch information
wantehchang committed Jul 29, 2024
1 parent ead9392 commit 5125ca2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake/Modules/LocalAom.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ if(EXISTS "${LIB_FILENAME}")
set(_AOM_PC_LIBRARIES "${_AOM_STATIC_LIBRARIES}")
# remove "aom" so we only have library dependencies
list(REMOVE_ITEM _AOM_PC_LIBRARIES "aom")
# Work around crbug.com/aomedia/356153293: aom.pc has -lm in the
# Libs.private field on all platforms, whether libm or m.lib exists or not.
if(WIN32 OR APPLE)
list(REMOVE_ITEM _AOM_PC_LIBRARIES "m")
endif()

# Add absolute paths to libraries
foreach(_lib ${_AOM_PC_LIBRARIES})
Expand Down

0 comments on commit 5125ca2

Please sign in to comment.