hdf5: add *.pc file

This commit is contained in:
Tony Theodore 2017-11-20 20:13:50 +11:00
parent cf8df92574
commit 2194eb9855
1 changed files with 11 additions and 2 deletions

View File

@ -65,11 +65,20 @@ define $(PKG)_BUILD
echo 'set(HDF5_CXX_COMPILER_EXECUTABLE $(PREFIX)/bin/$(TARGET)-h5c++)'; \
) > '$(CMAKE_TOOLCHAIN_DIR)/$(PKG).cmake'
## test hdf5
# create pkg-config file
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig'
(echo 'Name: $(PKG)'; \
echo 'Version: $($(PKG)_VERSION)'; \
echo 'Description: $($(PKG)_DESCR)'; \
echo 'Requires: zlib'; \
echo 'Libs: -lhdf5_hl -lhdf5'; \
) > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc'
# compile test
'$(TARGET)-g++' \
-W -Wall -Werror -ansi -pedantic \
'$(PWD)/src/$(PKG)-test.cpp' -o '$(PREFIX)/$(TARGET)/bin/test-hdf5.exe' \
-lhdf5_hl -lhdf5 -lz
`'$(TARGET)-pkg-config' $(PKG) --cflags --libs`
# test cmake can find hdf5
mkdir '$(1).test-cmake'