Use proper generator expression for aom (#2855)
To prevent errors with the newer versions like:
CMake Error in build/_deps/libaom-src/CMakeLists.txt:
Target "aom" INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/usr/local/google/home/vrabaud/software/avif/build/_deps/libaom-src"
which is prefixed in the build directory.diff --git a/cmake/Modules/LocalAom.cmake b/cmake/Modules/LocalAom.cmake
index 7d990ab..31a622f 100644
--- a/cmake/Modules/LocalAom.cmake
+++ b/cmake/Modules/LocalAom.cmake
@@ -18,10 +18,10 @@
message(STATUS "${AOM_MESSAGE_PREFIX}: compiled library found at ${LIB_FILENAME}")
add_library(aom STATIC IMPORTED GLOBAL)
set_target_properties(aom PROPERTIES IMPORTED_LOCATION "${LIB_FILENAME}" AVIF_LOCAL ON)
- target_include_directories(aom INTERFACE "${AOM_EXT_SOURCE_DIR}")
+ target_include_directories(aom INTERFACE $<BUILD_INTERFACE:${AOM_EXT_SOURCE_DIR}>)
if(AVIF_CODEC_AVM)
# ext/avm/aom/aom_encoder.h includes config/aom_config.h which is generated by the local build of avm.
- target_include_directories(aom INTERFACE "${AOM_EXT_SOURCE_DIR}/build.libavif")
+ target_include_directories(aom INTERFACE $<BUILD_INTERFACE:${AOM_EXT_SOURCE_DIR}/build.libavif>)
endif()
# Add link dependency flags from the aom.pc file in ext/aom or ext/avm
@@ -185,7 +185,7 @@
endif()
set_property(TARGET aom PROPERTY AVIF_LOCAL ON)
- target_include_directories(aom INTERFACE "${libaom_SOURCE_DIR}" ${AOM_BINARY_DIR})
+ target_include_directories(aom INTERFACE $<BUILD_INTERFACE:$<PATH:ABSOLUTE_PATH,${libaom_SOURCE_DIR},/>;${AOM_BINARY_DIR}>)
message(CHECK_PASS "complete")
endif()