Unidata / netcdf-cxx4

Official GitHub repository for netCDF-C++ libraries and utilities.
Other
128 stars 49 forks source link

`${HDF5_C_LIBRARY_hdf5}` still used in cxx4/CMakeLists.txt #107

Open lakinwecker opened 3 years ago

lakinwecker commented 3 years ago

https://github.com/Unidata/netcdf-cxx4/blob/162d78a8c4dc33379df746dfe232d0aaebc705db/cxx4/CMakeLists.txt#L27 as referenced in a few issues (notably #92 and #106), this variable seems to be empty and should probably be replaced with: ${HDF5_C_LIBRARIES}

lakinwecker commented 3 years ago

This is certainly not the correct fix ( https://github.com/lakinwecker/netcdf-cxx4/commit/327bc0bfd29226242544e8e7e402abb5d9fe126e ) but I was trying to compile netcdf-cxx4 master against the conan-centre provided hdf5, and netcdf. I have netcdf-cxx4 as a submodule in my project, and I have it added to the project via add_subdirectory and these are the changes necessary to get it to compile/link properly. I doubt these are the correct changes, but something to consider.

At the moment, I feel that the netcdf and hdf5 packages provided by conan-centre are not properly providing the variables and so find_package is having to do some default things, and thus I can't depend on a specific variable to nicely capture all of the sub dependencies of both for linking purposes.

I realize that this may not quite be the appropriate forum for this information, but I'm also not sure where else to put it. Hopefully this isn't too much noise.