# Cmake netcdf build

**URL:** <https://forum.hdfgroup.org/t/cmake-netcdf-build/2881>\
**Category:** Hdf-forum archives\
**Created:** [May 1, 2013, 4:12am UTC](https://forum.hdfgroup.org/t/cmake-netcdf-build/2881 "2013-05-01T04:12:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pedro\_Vicente1](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/p/aeb1de/32.png) [@Pedro\_Vicente1](https://forum.hdfgroup.org/u/Pedro_Vicente1)\
**Post date:** [May 1, 2013, 4:12am UTC](https://forum.hdfgroup.org/t/cmake-netcdf-build/2881/1 "2013-05-01T04:12:40Z")

</div>

Hi Ward

I did a svn update from the netcdf repo

I get these errors while building in Windows with Cmake

Is the svn code assumed to build all the time ?

Pedro

W:\netcdf\_svn\build\>cmake -D"HDF5\_INCLUDE\_DIR=T:\hdf5-1.8.11-pre1\src" -D"HDF5\_LIB=T:\hdf5-1.8.11-pre1\build\bin\Debug\libhdf5\_D.lib" -D"HDF5\_HL\_LIB=T:\hdf5-1.8.11-pre1\build\bin\  
Debug\libhdf5\_hl\_D.lib" -D"ZLIB\_INCLUDE\_DIR:PATH=T:\zlib-1.2.5" -D"ZLIB\_LIBRARY:FILEPATH=T:\zlib-1.2.5\build\bin\Debug\libzlib\_D.lib" -D"SZIP\_INCLUDE\_DIR:PATH=T:\szip-2.1\src" -D"S  
ZIP\_LIBRARY:FILEPATH=T:\szip-2.1\build\bin\Debug\libszip\_D.lib" -D"ENABLE\_DAP=ON" -D"BUILD\_SHARED\_LIBS=OFF" -D"ENABLE\_DLL=OFF" -D"CURL\_LIBRARY=W:\curl-7.29.0\builds\libcurl-vc10-x  
86-debug-static-ipv6-sspi-spnego-winssl\lib\libcurl\_a\_debug.lib" -D"CURL\_INCLUDE\_DIR=W:\curl-7.29.0\builds\libcurl-vc10-x86-debug-static-ipv6-sspi-spnego-winssl\include" ..  
-- Building for: Visual Studio 10  
-- The C compiler identification is MSVC 16.0.40219.1  
-- Check for working C compiler using: Visual Studio 10  
-- Check for working C compiler using: Visual Studio 10 -- works  
-- Detecting C compiler ABI info  
-- Detecting C compiler ABI info - done  
CMake Error at CMakeLists.txt:386 (FIND\_PACKAGE):  
&nbsp;&nbsp;Could not find a package configuration file provided by "HDF5" with any of  
&nbsp;&nbsp;the following names:

&nbsp;&nbsp;&nbsp;&nbsp;HDF5Config.cmake  
&nbsp;&nbsp;&nbsp;&nbsp;hdf5-config.cmake

&nbsp;&nbsp;Add the installation prefix of "HDF5" to CMAKE\_PREFIX\_PATH or set  
&nbsp;&nbsp;"HDF5\_DIR" to a directory containing one of the above files. If "HDF5"  
&nbsp;&nbsp;provides a separate development package or SDK, be sure it has been  
&nbsp;&nbsp;installed.

-- Configuring incomplete, errors occurred!

W:\netcdf\_svn\build\>

> **···**
>
> ------  
> Pedro Vicente, Earth System Science  
> University of California, Irvine  
> [http://www.ess.uci.edu/](http://www.ess.uci.edu/)

---

<div class="post-metadata">

**Author:** ![John\_Biddiscombe](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/j/ee7513/32.png) [@John\_Biddiscombe](https://forum.hdfgroup.org/u/John_Biddiscombe)\
**Post date:** [May 1, 2013, 7:54pm UTC](https://forum.hdfgroup.org/t/cmake-netcdf-build/2881/2 "2013-05-01T19:54:30Z")

</div>

> 

&nbsp;&nbsp;Could not find a package configuration file provided by "HDF5" with any of  
&nbsp;&nbsp;the following names:

&nbsp;&nbsp;&nbsp;&nbsp;HDF5Config.cmake  
&nbsp;&nbsp;&nbsp;&nbsp;hdf5-config.cmake

&nbsp;&nbsp;Add the installation prefix of "HDF5" to CMAKE\_PREFIX\_PATH or set  
&nbsp;&nbsp;"HDF5\_DIR" to a directory containing one of the above files.  
\<

Go to you hdf5 build dir, do a make install and then use -DHDF5\_DIR= the dir containing the config file in the installed location. You can do It from the hdf5 build dir if you know what you're doing, but you clearly don't, so it's best to use the 'approved' method.

JB
