-
Notifications
You must be signed in to change notification settings - Fork 279
Description
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
netcdf-c/plugins/CMakeLists.txt
Lines 97 to 103 in 9137873
IF(HAVE_LOCAL_BZ2) | |
SET(h5bzip2_SOURCES H5Zbzip2.c blocksort.c huffman.c crctable.c randtable.c compress.c decompress.c bzlib.c bzlib.h bzlib_private.h) | |
buildplugin(h5bzip2 "h5bzip2") | |
ELSE() | |
SET(h5bzip2_SOURCES H5Zbzip2.c) | |
buildplugin(h5bzip2 "h5bzip2" ${Bzip2_LIBRARIES}) | |
ENDIF() |
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
netcdf-c/plugins/CMakeLists.txt
Lines 116 to 118 in 9137873
IF(Bzip2_FOUND) | |
installplugin(h5bzip2) | |
ENDIF() |
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?