Commit 67b5a30d authored by Tom Finegan's avatar Tom Finegan

Support CONFIG_ANALYZER in the cmake build.

- Use the FindwxWidgets (the cmake module) to detect library
  flags and handle include paths.
- Update target to link in the libs located by FindwxWidgets.
- Enable CONFIG_INSPECTION and warn at generation time when it's
  not present and CONFIG_ANALYZER is enabled.

BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=76

Change-Id: Ica949107d199af9d8241ca639cc27753d4a30dfc
parent 5443ff3a
......@@ -205,13 +205,12 @@ add_executable(aomenc
$<TARGET_OBJECTS:aom_encoder_stats>)
if (CONFIG_ANALYZER)
add_executable(analyzer
"${AOM_ROOT}/examples/analyzer.cc"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_decoder_app_util>)
set(AOM_APP_TARGETS ${AOM_APP_TARGETS} analyzer)
append_cxx_flag("$ENV{WX_CXXFLAGS}")
append_exe_linker_flag("$ENV{WX_LDFLAGS}")
add_executable(analyzer
"${AOM_ROOT}/examples/analyzer.cc"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_decoder_app_util>)
target_link_libraries(analyzer PUBLIC ${wxWidgets_LIBRARIES})
set(AOM_APP_TARGETS ${AOM_APP_TARGETS} analyzer)
endif ()
add_executable(decode_to_md5
......
......@@ -11,6 +11,7 @@
include(FindGit)
include(FindPerl)
include(FindThreads)
include(FindwxWidgets)
# Generate the user config settings. This must occur before include of
# aom_config_defaults.cmake (because it turns every config variable into a cache
......@@ -141,6 +142,17 @@ aom_check_source_compiles("aom_ports_check"
aom_check_source_compiles("pthread_check" "#include <pthread.h>" HAVE_PTHREAD_H)
aom_check_source_compiles("unistd_check" "#include <unistd.h>" HAVE_UNISTD_H)
if (CONFIG_ANALYZER)
find_package(wxWidgets REQUIRED adv base core)
include(${wxWidgets_USE_FILE})
if (NOT CONFIG_INSPECTION)
set(CONFIG_INSPECTION 1)
message(WARNING
"--- Enabled CONFIG_INSPECTION, required for CONFIG_ANALYZER.")
endif ()
endif ()
if (CONFIG_ANS AND CONFIG_DAALA_EC)
message(FATAL_ERROR
"CONFIG_ANS and CONFIG_DAALA_EC cannot be enabled together.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment