HDF5 1.8.10 patch1 CMake linking error

Hi,

I am trying to link HDF5 with my application using CMake. The system is
ubuntu 12.10 with CMake 2.8.9.
I have compiled the library from source downloaded at http://www.hdfgroup.org/.
HDF5 compiling go smooth and generate a directories hierarchy such as
./bin, ./lib, ./share/cmake ....

The command find_package(HDF5 REQUIRED COMPONENTS CXX C) finds the
configfile hdf5-
config.cmake in the right path and variables HDF5_INCLUDE_DIRS and
HDF5_INCLUDE_DIR_CPP point to the right paths.

When i compile my program a lots of linkink errors appear such as

build/lib/libhdf5_cpp.a(H5DataSet.cpp.o): In function `H5::DataSet
::close()':
H5DataSet.cpp:(.text+0x44): undefined reference to `H5Dclose'

From my understanding the c++ wrapper is not able to link with che C

librarie, but the linker is set to join both libhdf5.a and libhdf5_cpp.a.

What i am doing wrong?

Thanks!

Mario