Skip to content

build netcdf with CMAKE under MSVC 2022 #2697

@jbensabat

Description

@jbensabat

Hello
I am trying to build netcdf with cmake under MSVC 2022
first I built hdf5 with zlib

then in CMAKE i get the following error

Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22621.
CMake Error at C:/software/hdf5/bin/hdf5-config.cmake:145 (include):
include could not find requested file:

C:/software/hdf5/cmake/hdf5-targets.cmake

Call Stack (most recent call first):
CMakeLists.txt:743 (FIND_PACKAGE)

Using HDF5 include dir: C:/software/hdf5/include;
CMake Error at CMakeLists.txt:887 (MESSAGE):
HDF5 was built without zlib. Rebuild HDF5 with zlib.

Configuring incomplete, errors occurred!
See also "C:/software/netcdf/bin/CMakeFiles/CMakeOutput.log".
See also "C:/software/netcdf/bin/CMakeFiles/CMakeError.log".

It seems that the cmake script is not aware of the fact hdf5 was built with zlib

any help would really be appreciated
best
jac

To report a non-security related issue, please provide:

  • the version of the software with which you are encountering an issue
  • environmental information (i.e. Operating System, compiler info, java version, python version, etc.)
  • a description of the issue with the steps needed to reproduce it

If you have a general question about the software, please view our Suggested Support Process.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions