summaryrefslogtreecommitdiffstats
path: root/src/assimp.mk
blob: 9d2296b5069739f64193b0bf59d18cd2cffffb5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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/" | \
    grep 'assimp/files' | \
    $(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