Honor CMake's builtin CMAKE_SKIP_INSTALL_RULES
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4fe4fe3..b48ce47 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,9 @@
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 ## [Unreleased]
+### Added
+- Honor CMake's builtin `CMAKE_SKIP_INSTALL_RULES`
+
 ### Changed
 - avifenc - Removed accidental double-delete of avifImage when failing to read a y4m file input
 
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc93bbb..7aac87e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -243,6 +243,10 @@
     target_link_libraries(avif_example1 avif ${AVIF_PLATFORM_LIBRARIES})
 endif()
 
+if(CMAKE_SKIP_INSTALL_RULES)
+    set(SKIP_INSTALL_ALL TRUE)
+endif()
+
 if(NOT SKIP_INSTALL_ALL)
     include(GNUInstallDirs)
 endif()