Set CMAKE_POLICY_VERSION_MINIMUM=3.9 to allow IPO with gcc

This commit is contained in:
Frankie Dintino 2025-05-01 10:37:21 -04:00
parent f40eed2297
commit 890548036f
No known key found for this signature in database
GPG Key ID: 97E295AACFBABD9E

View File

@ -132,8 +132,10 @@ function build_libavif {
# libavif) to disable the compilation and inclusion of aom's AV1 decoder.
# CONFIG_AV1_HIGHBITDEPTH=0 is another flag for libaom that disables support
# for encoding high bit depth images.
# CMAKE_POLICY_VERSION_MINIMUM=3.9 enables cmake policy CMP0069, which is
# required to allow INTERPROCEDURAL_OPTIMIZATION (-flto) WITH gcc
(cd $out_dir \
&& CMAKE_POLICY_VERSION_MINIMUM=3.5 cmake \
&& CMAKE_POLICY_VERSION_MINIMUM=3.9 cmake \
-DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX \
-DCMAKE_INSTALL_LIBDIR=$BUILD_PREFIX/lib \
-DCMAKE_INSTALL_NAME_DIR=$BUILD_PREFIX/lib \