add package assimp

pull/315/head
Josh Heidenreich 10 years ago committed by Tony Theodore
parent 04862bc8d9
commit 5832d3b707

@ -1115,6 +1115,10 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre>
<td class="package">armadillo</td>
<td class="website"><a href="http://arma.sourceforge.net/">Armadillo C++ linear algebra library</a></td>
</tr>
<tr>
<td class="package">assimp</td>
<td class="website"><a href="http://assimp.sourceforge.net/">Assimp Open Asset Import Library</a></td>
</tr>
<tr>
<td class="package">atk</td>
<td class="website"><a href="http://www.gtk.org/">ATK</a></td>

@ -0,0 +1,31 @@
/*
* This file is part of MXE.
* See index.html for further information.
*/
#include <assimp/cimport.h>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include <string.h>
int main(int argc, char *argv[])
{
const struct aiScene* scene = NULL;
/* NFF file for a single spere with radius 5 at pos 0x0x0 */
const char* buf =
"--- begin of file\n"
"s 0 0 0 5\n"
"--- end of file\n";
(void)argc;
(void)argv;
scene = aiImportFileFromMemory(buf, strlen(buf), aiProcessPreset_TargetRealtime_MaxQuality, "nff");
(void)scene;
if (scene->mNumMeshes != 1) return 1;
aiReleaseImport(scene);
return 0;
}

@ -0,0 +1,32 @@
# This file is part of MXE.
# See index.html for further information.
PKG := assimp
$(PKG)_IGNORE :=
$(PKG)_VERSION := 3.0
$(PKG)_VERBUILD := 3.0.1270
$(PKG)_CHECKSUM := e80a3a4326b649ed6585c0ce312ed6dd68942834
$(PKG)_SUBDIR := $(PKG)--$($(PKG)_VERBUILD)-source-only
$(PKG)_FILE := $(PKG)--$($(PKG)_VERBUILD)-source-only.zip
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc boost
define $(PKG)_UPDATE
$(WGET) -q -O- "http://sourceforge.net/projects/assimp/files/assimp/" | \
grep 'assimp/files/assimp' | \
$(SED) -n 's,.*assimp/\([0-9][^>]*\)/.*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
cd '$(1)' && cmake . \
-DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
-DBUILD_ASSIMP_TOOLS=OFF \
-DBUILD_ASSIMP_SAMPLES=OFF
$(MAKE) -C '$(1)' -j '$(JOBS)' install VERBOSE=1
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-assimp.exe' \
`'$(TARGET)-pkg-config' assimp --cflags --libs`
endef
Loading…
Cancel
Save