Bzip2/Bz2 confusion in Cmake build
I think there is some confusion between Bzip2 and Bz2 in the Cmake build.
Namely, there are two Cmake detection modules (here and here), but only the Bz2 one seems to be called, leading to only the Bz2_FOUND variable being set.
In the plugin section, the bzip2 plugin is build unconditionally, either with the vendored copy of libbzip2 or the system one, see https://github.com/Unidata/netcdf-c/blob/9137873b3d81288339337441073f9a88644a8374/plugins/CMakeLists.txt#L97-L103
However, the install of the plugin is conditioned on the Bzip2_FOUND variable, which is never set, meaning the plugin will never be installed, see https://github.com/Unidata/netcdf-c/blob/9137873b3d81288339337441073f9a88644a8374/plugins/CMakeLists.txt#L116-L118.
Unless there is a separate Bz2 library or something else that I am not aware of, the Cmake documentation seems to suggest that one should instead use FIND_PACKAGE(Bzip2) and remove the usage of Bz2?
Thanks! I'll take a look.