Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: use EXCLUDE_FROM_ALL when declaring Fetch for deflate library
Commit af9ef0e made a change in the CMake setup to switch from using FetchContent_Populate() to FetchContent_MakeAvailable() to bring in libdeflate (and Imath) as dependencies. Using FetchContent_MakeAvailable() has the side effect that libdeflate is now being included as part of the build, causing libraries and headers to be built and installed. The intent with fetching the deflate source is solely to copy select files into OpenEXRCore, so this change adds the EXCLUDE_FROM_ALL option to the call to FetchContent_Declare() to prevent deflate from being included in the build. One wrinkle though is that prior to CMake 3.28, passing the EXCLUDE_FROM_ALL option to FetchContent_Declare() does *not* have the desired effect of excluding the fetched content from the build when FetchContent_MakeAvailable() is called, so we "manually" exclude it for those CMake versions.
- Loading branch information