Bug 1445683 - Do not build aomstats unless examples are enabled; r=chmanchester
The aomstats library is only used in the code examples, but we assume that all
libraries should be linked into libxul, which leads to an unresolved external
dependency on fatal at link time. This adds a guard to only build aomstats if
we are building the examples.
MozReview-Commit-ID: 8CRK3klUPk7
--- a/third_party/aom/CMakeLists.txt
+++ b/third_party/aom/CMakeLists.txt
@@ -181,19 +181,21 @@ list(APPEND AOM_ENCODER_APP_UTIL_SOURCES
"${AOM_ROOT}/common/video_writer.h"
"${AOM_ROOT}/common/warnings.c"
"${AOM_ROOT}/common/warnings.h"
"${AOM_ROOT}/common/y4minput.c"
"${AOM_ROOT}/common/y4minput.h"
"${AOM_ROOT}/examples/encoder_util.h"
"${AOM_ROOT}/examples/encoder_util.c")
-list(APPEND AOM_ENCODER_STATS_SOURCES "${AOM_ROOT}/stats/aomstats.c"
- "${AOM_ROOT}/stats/aomstats.h" "${AOM_ROOT}/stats/rate_hist.c"
- "${AOM_ROOT}/stats/rate_hist.h")
+if (ENABLE_EXAMPLES)
+ list(APPEND AOM_ENCODER_STATS_SOURCES "${AOM_ROOT}/stats/aomstats.c"
+ "${AOM_ROOT}/stats/aomstats.h" "${AOM_ROOT}/stats/rate_hist.c"
+ "${AOM_ROOT}/stats/rate_hist.h")
+endif ()
list(APPEND AOM_PKG_CONFIG_SOURCES "${AOM_CONFIG_DIR}/aom.pc")
list(APPEND AOM_VERSION_SOURCES "${AOM_CONFIG_DIR}/config/aom_version.h")
list(APPEND AOM_WEBM_DECODER_SOURCES "${AOM_ROOT}/common/webmdec.cc"
"${AOM_ROOT}/common/webmdec.h")