package freeimage: create and use pkg-config file

This commit is contained in:
Tony Theodore 2013-03-12 04:43:36 +11:00
parent 120046cdac
commit a327292b95
1 changed files with 10 additions and 1 deletions

View File

@ -29,8 +29,17 @@ define $(PKG)_BUILD
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
$(INSTALL) -m644 '$(1)/Source/FreeImage.h' '$(PREFIX)/$(TARGET)/include/'
# create pkg-config file
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig'
(echo 'Name: freeimage'; \
echo 'Version: $(freeimage_VERSION)'; \
echo 'Description: FreeImage'; \
echo 'Cflags: -DFREEIMAGE_LIB'; \
echo 'Libs: -lfreeimage';) \
> '$(PREFIX)/$(TARGET)/lib/pkgconfig/freeimage.pc'
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-freeimage.exe' \
-lfreeimage -DFREEIMAGE_LIB
`'$(TARGET)-pkg-config' freeimage --cflags --libs`
endef