diff --git a/CMakeLists.txt b/CMakeLists.txt index f3630ac8..0732bec0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,8 @@ endif() include(FetchContent) include(cmake/deps.cmake) +# Be sure to make zlib available before libpng, otherwise libpng +# will attempt to `find_package(ZLIB)` without going through `FetchContent`. if(NOT DEFINED ZLIB_BUILD_TESTING) # Unless overridden (e.g. in the cache), we don't care about zlib's tests. set(ZLIB_BUILD_TESTING OFF) endif()