mxe/src/pcl.mk

52 lines
1.9 KiB
Makefile
Raw Normal View History

2012-12-06 12:27:37 +00:00
# This file is part of MXE.
# See index.html for further information.
PKG := pcl
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.7.1
$(PKG)_CHECKSUM := 784bce606141260423ea04f37b093f59d4c94c6a
$(PKG)_SUBDIR := $(PKG)-$(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://github.com/PointCloudLibrary/pcl/archive/$($(PKG)_FILE)
2012-12-06 12:27:37 +00:00
$(PKG)_DEPS := gcc libgomp boost eigen flann vtk
define $(PKG)_UPDATE
$(WGET) -q -O- "https://github.com/PointCloudLibrary/pcl/releases" | \
2013-03-23 10:54:24 +00:00
grep '<a href=.*tar' | \
$(SED) -n 's,.*pcl-\([0-9][^>]*\)\.tar.*,\1,p' | \
2013-03-23 10:54:24 +00:00
head -1
2012-12-06 12:27:37 +00:00
endef
# There is a strange problem where including <cfloat> leads to an error
# in some of the #include_next magic with float.h.
# We work around this by avoiding an #include_next in MinGW's float.h
# (by defining __FLOAT_H) and then manually defining the MIN/MAX macros
# that PCL wants to use.
define $(PKG)_BUILD
mkdir '$(1).build'
cd '$(1).build' && \
2012-12-06 12:27:37 +00:00
CXXFLAGS="-D__FLOAT_H -DFLT_MAX=__FLT_MAX__ -DFLT_MIN=__FLT_MIN__ -DDBL_MAX=__DBL_MAX__ -DDBL_MIN=__DBL_MIN__" \
cmake '$(1)' \
2012-12-06 12:27:37 +00:00
-DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
2013-06-23 14:19:51 +01:00
-DVTK_DIR='$(PREFIX)/$(TARGET)/lib/vtk-5.8' \
2012-12-06 12:27:37 +00:00
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_RELEASE_POSTFIX='' \
-DBoost_THREADAPI=win32 \
-DPCL_SHARED_LIBS=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_apps=OFF \
-DBUILD_examples=OFF \
-DBUILD_global_tests=OFF \
-DBUILD_tools=OFF \
-DHAVE_MM_MALLOC_EXITCODE=0 \
-DHAVE_SSE4_1_EXTENSIONS_EXITCODE=0 \
-DHAVE_SSE3_EXTENSIONS_EXITCODE=0 \
-DHAVE_SSE2_EXTENSIONS_EXITCODE=0 \
-DHAVE_SSE_EXTENSIONS_EXITCODE=0
$(MAKE) -C '$(1).build' -j '$(JOBS)' VERBOSE=1 || $(MAKE) -C '$(1)' -j 1 VERBOSE=1
$(MAKE) -C '$(1).build' -j 1 install VERBOSE=1
2012-12-06 12:27:37 +00:00
endef
$(PKG)_BUILD_SHARED =