diff options
author | fiesh <weiss@wsoptics.de> | 2015-12-14 17:40:06 (GMT) |
---|---|---|
committer | fiesh <weiss@wsoptics.de> | 2015-12-17 11:18:23 (GMT) |
commit | 196a2414d8df36bed504dff3f509a43ca63819c3 (patch) | |
tree | 02e7b710fd33a1e3dd2e2bc7af74fde49c536803 /src | |
parent | 8e8959829d942ff11e1db055b79079eb5c856335 (diff) | |
download | mxe-196a2414d8df36bed504dff3f509a43ca63819c3.zip mxe-196a2414d8df36bed504dff3f509a43ca63819c3.tar.gz mxe-196a2414d8df36bed504dff3f509a43ca63819c3.tar.bz2 |
also build and install FreeImagePlus
Diffstat (limited to 'src')
-rw-r--r-- | src/freeimage-test.cpp | 15 | ||||
-rw-r--r-- | src/freeimage.mk | 23 |
2 files changed, 37 insertions, 1 deletions
diff --git a/src/freeimage-test.cpp b/src/freeimage-test.cpp new file mode 100644 index 0000000..10a4eb1 --- /dev/null +++ b/src/freeimage-test.cpp @@ -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; +} diff --git a/src/freeimage.mk b/src/freeimage.mk index 6b9f8c1..bb85db2 100644 --- a/src/freeimage.mk +++ b/src/freeimage.mk @@ -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 = |