Skip to content

Commit 5125ca2

Browse files
committed
Work around the bug that aom.pc always has -lm
Fix an issue introduced in #2304 when libaom is built locally in the ext/ directory. See #2304 (review) for more information. Related to #2274.
1 parent ead9392 commit 5125ca2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cmake/Modules/LocalAom.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ if(EXISTS "${LIB_FILENAME}")
3838
set(_AOM_PC_LIBRARIES "${_AOM_STATIC_LIBRARIES}")
3939
# remove "aom" so we only have library dependencies
4040
list(REMOVE_ITEM _AOM_PC_LIBRARIES "aom")
41+
# Work around crbug.com/aomedia/356153293: aom.pc has -lm in the
42+
# Libs.private field on all platforms, whether libm or m.lib exists or not.
43+
if(WIN32 OR APPLE)
44+
list(REMOVE_ITEM _AOM_PC_LIBRARIES "m")
45+
endif()
4146

4247
# Add absolute paths to libraries
4348
foreach(_lib ${_AOM_PC_LIBRARIES})

0 commit comments

Comments
 (0)