also build and install FreeImagePlus

This commit is contained in:
fiesh 2015-12-14 18:40:06 +01:00
parent 8e8959829d
commit 196a2414d8
2 changed files with 37 additions and 1 deletions

15
src/freeimage-test.cpp Normal file
View File

@ -0,0 +1,15 @@
/*
* This file is part of MXE.
* See index.html for further information.
*/
#include <FreeImagePlus.h>
int main()
{
fipImage fi;
fi.setSize(FIT_BITMAP, 800, 600, 24);
return 0;
}

View File

@ -25,12 +25,22 @@ define $(PKG)_BUILD
FREEIMAGE_LIBRARY_TYPE=STATIC \
TARGET=freeimage
$(MAKE) -C '$(1)' -j '$(JOBS)' -f Makefile.fip \
CXX='$(TARGET)-g++' \
CXXFLAGS='-DFREEIMAGE_LIB' \
CC='$(TARGET)-gcc' \
AR='$(TARGET)-ar' \
RC='$(TARGET)-windres' \
libfreeimageplus.a
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
$(INSTALL) -m644 '$(1)/libfreeimage.a' '$(PREFIX)/$(TARGET)/lib/'
$(INSTALL) -m644 '$(1)/libfreeimageplus.a' '$(PREFIX)/$(TARGET)/lib/'
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
$(INSTALL) -m644 '$(1)/Source/FreeImage.h' '$(PREFIX)/$(TARGET)/include/'
$(INSTALL) -m644 '$(1)/Wrapper/FreeImagePlus/FreeImagePlus.h' '$(PREFIX)/$(TARGET)/include/'
# create pkg-config file
# create pkg-config files
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig'
(echo 'Name: freeimage'; \
echo 'Version: $(freeimage_VERSION)'; \
@ -38,11 +48,22 @@ define $(PKG)_BUILD
echo 'Cflags: -DFREEIMAGE_LIB'; \
echo 'Libs: -lfreeimage -lws2_32 -lstdc++';) \
> '$(PREFIX)/$(TARGET)/lib/pkgconfig/freeimage.pc'
(echo 'Name: freeimageplus'; \
echo 'Version: $(freeimage_VERSION)'; \
echo "Description: FreeImagePlus"; \
echo 'Cflags: -DFREEIMAGE_LIB'; \
echo 'Libs: -lfreeimage -lfreeimageplus -lws2_32';) \
> '$(PREFIX)/$(TARGET)/lib/pkgconfig/freeimageplus.pc'
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-freeimage.exe' \
`'$(TARGET)-pkg-config' freeimage --cflags --libs`
'$(TARGET)-g++' \
-W -Wall -Werror -ansi -pedantic \
'$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-freeimageplus.exe' \
`'$(TARGET)-pkg-config' freeimageplus --cflags --libs`
endef
$(PKG)_BUILD_SHARED =