Bug 1445683 - Do not build aomstats unless examples are enabled; r=chmanchester
authorDan Minor <dminor@mozilla.com>
Tue, 26 Jun 2018 09:56:13 -0400
changeset 818889 be48a07172d35f93cccfc29831ce01e45cc421d3
parent 818888 0f16daade35d58c27e50980bb528a59504c7d3e4
child 818890 e855ea274395dbe1c6a67173ab6607ebda025a3b
push id116388
push userrwood@mozilla.com
push dateMon, 16 Jul 2018 19:48:57 +0000
reviewerschmanchester
bugs1445683
milestone63.0a1
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
third_party/aom/CMakeLists.txt
--- 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")