cmake: fix VMAF_CFLAGS handling This may be a list of items, e.g., -pthread;-I... Fixes missing libvmaf.h include errors due to the include path not being added to the compile flags. Bug: aomedia:3464 Change-Id: I5c445da148018f4ebe97663d7fe9fc7bbd5448be (cherry picked from commit eff5e508b3be88b54e85e2020efb8e488c509186)
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b18659..371ecd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -648,7 +648,9 @@ target_include_directories(aom PRIVATE ${VMAF_INCLUDE_DIRS}) target_include_directories(aom_dsp_encoder PRIVATE ${VMAF_INCLUDE_DIRS}) if(VMAF_CFLAGS) - append_compiler_flag("${VMAF_CFLAGS}") + foreach(flag "${VMAF_CFLAGS}") + append_compiler_flag("${flag}") + endforeach() endif() else() message(FATAL_ERROR "CONFIG_TUNE_VMAF error: pkg-config not found.")